Skip to content

Commit 23cd24a

Browse files
committed
Skip test on windows
1 parent 61c28da commit 23cd24a

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

exporter/opentelemetry-exporter-otlp-proto-grpc/tests/test_otlp_exporter_mixin.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -312,6 +312,10 @@ def test_shutdown(self):
312312
"Exporter already shutdown, ignoring batch",
313313
)
314314

315+
@unittest.skipIf(
316+
system() == "Windows",
317+
"For gRPC + windows there's some added delay in the RPCs which breaks the assertion over amount of time passed.",
318+
)
315319
def test_shutdown_interrupts_export_retry_backoff(self):
316320
add_TraceServiceServicer_to_server(
317321
TraceServiceServicerWithExportParams(
@@ -327,7 +331,7 @@ def test_shutdown_interrupts_export_retry_backoff(self):
327331
begin_wait = time.time()
328332
export_thread.start()
329333
# Wait a bit for export to fail and the backoff sleep to start
330-
time.sleep(0.1)
334+
time.sleep(0.05)
331335
# The code should now be in a 1 second backoff.
332336
# pylint: disable=protected-access
333337
self.assertFalse(self.exporter._shutdown_is_occuring.is_set())
@@ -337,7 +341,7 @@ def test_shutdown_interrupts_export_retry_backoff(self):
337341
end_wait = time.time()
338342
self.assertEqual(export_result, SpanExportResult.FAILURE)
339343
# Shutdown should have interrupted the sleep.
340-
self.assertTrue(end_wait - begin_wait < 0.3)
344+
self.assertTrue(end_wait - begin_wait < 0.2)
341345
self.assertEqual(
342346
warning.records[1].message,
343347
"Shutdown in progress, aborting retry.",

0 commit comments

Comments
 (0)