There was an error while loading. Please reload this page.
1 parent f9754f3 commit 7515687Copy full SHA for 7515687
1 file changed
aikido_zen/sinks/tests/socket_test.py
@@ -6,11 +6,20 @@
6
import pytest
7
from unittest.mock import patch, MagicMock
8
import aikido_zen.sinks.socket # Import to ensure patching
9
+from aikido_zen.context import current_context
10
from aikido_zen.test_utils import generate_context
11
from aikido_zen.thread.thread_cache import get_cache
12
from aikido_zen.background_process.service_config import ServiceConfig
13
14
15
+@pytest.fixture(autouse=True)
16
+def run_around_tests():
17
+ yield
18
+ # Make sure to reset thread cache after every test
19
+ get_cache().reset()
20
+ current_context.set(None)
21
+
22
23
def test_socket_getaddrinfo_no_blocking():
24
"""Test that getaddrinfo works normally when no blocking is configured"""
25
# Reset cache to ensure clean state
0 commit comments