Skip to content

Commit 02c0a67

Browse files
work on fixture changes
1 parent bd5a977 commit 02c0a67

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

tests/conftest.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -323,6 +323,13 @@ def _flush(*args: "Any", **kwargs: "Any") -> "Any":
323323

324324
def flush() -> None:
325325
nonlocal drained_count
326+
# If the background flusher thread was never started (no spans have
327+
# been added), there is no thread to drain and the counter will never
328+
# advance. Fall back to the original synchronous flush.
329+
if batcher._flusher is None or not batcher._flusher.is_alive():
330+
orig_flush()
331+
return
332+
326333
with lock:
327334
target = drained_count
328335

0 commit comments

Comments
 (0)