We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dca0d41 commit 52a5e93Copy full SHA for 52a5e93
opentelemetry-sdk/tests/logs/test_export.py
@@ -17,6 +17,7 @@
17
import os
18
import time
19
import unittest
20
+import warnings
21
from concurrent.futures import ThreadPoolExecutor
22
from sys import version_info
23
from unittest.mock import Mock, patch
@@ -193,7 +194,7 @@ def test_simple_log_record_processor_shutdown(self):
193
194
)
195
exporter.clear()
196
logger_provider.shutdown()
- with self.assertLogs(level=logging.WARNING):
197
+ with warnings.catch_warnings(record=True):
198
logger.warning("Log after shutdown")
199
finished_logs = exporter.get_finished_logs()
200
self.assertEqual(len(finished_logs), 0)
0 commit comments