Skip to content

Commit b29af96

Browse files
committed
fix
1 parent 81fbc70 commit b29af96

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

eval_protocol/pytest/buffer.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,12 @@ async def close(self):
7171
Flush any remaining samples in the buffer.
7272
"""
7373
async with self.lock:
74+
# Also flush pending (incomplete) samples to avoid data loss
75+
if self.pending_samples:
76+
for rows in self.pending_samples.values():
77+
self.completed_samples_buffer.append(rows)
78+
self.pending_samples.clear()
79+
7480
if self.completed_samples_buffer:
7581
await self._flush_unsafe()
7682

0 commit comments

Comments
 (0)