Skip to content

Commit 54ae8ed

Browse files
Remove pytest fixture for event loop for session
It's cleaner to run an event loop for each test rather than for the entire session specially when the gRPC client is a singleton and its internal state can be corrupted when used concurrently from multiple async contexts.
1 parent c8aefc9 commit 54ae8ed

File tree

1 file changed

+0
-8
lines changed

1 file changed

+0
-8
lines changed

integration_tests/test_api.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -599,11 +599,3 @@ async def test_multiple_streams_different_filters(set_up: dict[str, Any]) -> Non
599599
), "Streamed order does not match area-specific order in stream 2"
600600
except asyncio.TimeoutError:
601601
pytest.fail("Failed to receive streamed orders within timeout")
602-
603-
604-
@pytest.fixture(scope="session")
605-
def event_loop() -> Generator[asyncio.AbstractEventLoop, None, None]:
606-
"""Create an event loop for the tests."""
607-
loop = asyncio.get_event_loop_policy().new_event_loop()
608-
yield loop
609-
loop.close()

0 commit comments

Comments
 (0)