Skip to content

Commit 7949b73

Browse files
committed
docs(tests): remove comments
1 parent 4a6fec8 commit 7949b73

File tree

3 files changed

+0
-21
lines changed

3 files changed

+0
-21
lines changed

exporter/opentelemetry-exporter-otlp-proto-http/tests/metrics/test_otlp_metrics_exporter.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -564,16 +564,12 @@ def test_export_no_collector_available_retryable(self, mock_post):
564564
mock_post.side_effect = ConnectionError(msg)
565565
with self.assertLogs(level=WARNING) as warning:
566566
before = time.time()
567-
# Set timeout to 1.5 seconds
568567
self.assertEqual(
569568
exporter.export(self.metrics["sum_int"]),
570569
MetricExportResult.FAILURE,
571570
)
572571
after = time.time()
573-
# First call at time 0, second at time 1, then an early return before the second backoff sleep b/c it would exceed timeout.
574-
# Additionally every retry results in two calls, therefore 4.
575572
self.assertEqual(mock_post.call_count, 4)
576-
# There's a +/-20% jitter on each backoff.
577573
self.assertTrue(0.75 < after - before < 1.25)
578574
self.assertIn(
579575
f"Transient error {msg} encountered while exporting metrics batch, retrying in",
@@ -586,14 +582,11 @@ def test_export_no_collector_available(self, mock_post):
586582

587583
mock_post.side_effect = requests.exceptions.RequestException()
588584
with self.assertLogs(level=WARNING) as warning:
589-
# Set timeout to 1.5 seconds
590585
self.assertEqual(
591586
exporter.export(self.metrics["sum_int"]),
592587
MetricExportResult.FAILURE,
593588
)
594-
# First call at time 0, second at time 1, then an early return before the second backoff sleep b/c it would exceed timeout.
595589
self.assertEqual(mock_post.call_count, 1)
596-
# There's a +/-20% jitter on each backoff.
597590
self.assertIn(
598591
"Failed to export metrics batch code",
599592
warning.records[0].message,

exporter/opentelemetry-exporter-otlp-proto-http/tests/test_proto_log_exporter.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -491,16 +491,12 @@ def test_export_no_collector_available_retryable(self, mock_post):
491491
mock_post.side_effect = ConnectionError(msg)
492492
with self.assertLogs(level=WARNING) as warning:
493493
before = time.time()
494-
# Set timeout to 1.5 seconds
495494
self.assertEqual(
496495
exporter.export(self._get_sdk_log_data()),
497496
LogRecordExportResult.FAILURE,
498497
)
499498
after = time.time()
500-
# First call at time 0, second at time 1, then an early return before the second backoff sleep b/c it would exceed timeout.
501-
# Additionally every retry results in two calls, therefore 4.
502499
self.assertEqual(mock_post.call_count, 4)
503-
# There's a +/-20% jitter on each backoff.
504500
self.assertTrue(0.75 < after - before < 1.25)
505501
self.assertIn(
506502
f"Transient error {msg} encountered while exporting logs batch, retrying in",
@@ -513,14 +509,11 @@ def test_export_no_collector_available(self, mock_post):
513509

514510
mock_post.side_effect = requests.exceptions.RequestException()
515511
with self.assertLogs(level=WARNING) as warning:
516-
# Set timeout to 1.5 seconds
517512
self.assertEqual(
518513
exporter.export(self._get_sdk_log_data()),
519514
LogRecordExportResult.FAILURE,
520515
)
521-
# First call at time 0, second at time 1, then an early return before the second backoff sleep b/c it would exceed timeout.
522516
self.assertEqual(mock_post.call_count, 1)
523-
# There's a +/-20% jitter on each backoff.
524517
self.assertIn(
525518
"Failed to export logs batch code",
526519
warning.records[0].message,

exporter/opentelemetry-exporter-otlp-proto-http/tests/test_proto_span_exporter.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -311,16 +311,12 @@ def test_export_no_collector_available_retryable(self, mock_post):
311311
mock_post.side_effect = ConnectionError(msg)
312312
with self.assertLogs(level=WARNING) as warning:
313313
before = time.time()
314-
# Set timeout to 1.5 seconds
315314
self.assertEqual(
316315
exporter.export([BASIC_SPAN]),
317316
SpanExportResult.FAILURE,
318317
)
319318
after = time.time()
320-
# First call at time 0, second at time 1, then an early return before the second backoff sleep b/c it would exceed timeout.
321-
# Additionally every retry results in two calls, therefore 4.
322319
self.assertEqual(mock_post.call_count, 4)
323-
# There's a +/-20% jitter on each backoff.
324320
self.assertTrue(0.75 < after - before < 1.25)
325321
self.assertIn(
326322
f"Transient error {msg} encountered while exporting span batch, retrying in",
@@ -333,14 +329,11 @@ def test_export_no_collector_available(self, mock_post):
333329

334330
mock_post.side_effect = requests.exceptions.RequestException()
335331
with self.assertLogs(level=WARNING) as warning:
336-
# Set timeout to 1.5 seconds
337332
self.assertEqual(
338333
exporter.export([BASIC_SPAN]),
339334
SpanExportResult.FAILURE,
340335
)
341-
# First call at time 0, second at time 1, then an early return before the second backoff sleep b/c it would exceed timeout.
342336
self.assertEqual(mock_post.call_count, 1)
343-
# There's a +/-20% jitter on each backoff.
344337
self.assertIn(
345338
"Failed to export span batch code",
346339
warning.records[0].message,

0 commit comments

Comments
 (0)