Skip to content

Commit 78bdaae

Browse files
authored
SNOW-943025: improve flaky OOB test (#1782)
1 parent b82cd7f commit 78bdaae

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

test/unit/test_telemetry_oob.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,12 @@ def test_telemetry_oob_simple_flush(telemetry_setup, caplog):
6969
"Failed to generate a JSON dump from the passed in telemetry OOB events"
7070
not in caplog.text
7171
)
72-
assert telemetry.size() == 0
72+
# since pytests can run test in parallel and TelemetryService is a singleton, other tests
73+
# might encounter error logged into the queue of the OOB Telemetry simultaneously
74+
# leading to assert telemetry.size() == 0 failure
75+
# here we check that the OCSP exception event in the test is flushed
76+
for event in list(telemetry.queue.queue):
77+
assert "OCSPException" not in event.name
7378

7479

7580
@pytest.mark.flaky(reruns=3)

0 commit comments

Comments
 (0)