File tree Expand file tree Collapse file tree 4 files changed +13
-1
lines changed
Expand file tree Collapse file tree 4 files changed +13
-1
lines changed Original file line number Diff line number Diff line change 72722 . Fixed integration test fixtures to use shared cluster
73733 . Forced IPv4 (127.0.0.1) instead of localhost to prevent IPv6 issues
74744 . Updated Cassandra memory settings to match GitHub CI (4GB/3GB)
75+ 5 . Fixed all linting errors:
76+ - Changed bare except to ` except Exception: `
77+ - Fixed trailing whitespace
78+ - Ensured proper file formatting
Original file line number Diff line number Diff line change @@ -258,6 +258,7 @@ async def close(self) -> None:
258258 )
259259 # Give the driver's internal threads time to finish
260260 # This helps prevent "cannot schedule new futures after shutdown" errors
261+ # The driver has internal scheduler threads that may still be running
261262 await asyncio .sleep (5.0 )
262263
263264 async def shutdown (self ) -> None :
Original file line number Diff line number Diff line change @@ -71,9 +71,12 @@ async def cassandra_cluster(cassandra_container): # noqa: F811
7171 if not health ["native_transport" ] or not health ["cql_available" ]:
7272 pytest .fail (f"Cassandra not healthy: { health } " )
7373
74- cluster = AsyncCluster (["localhost " ], protocol_version = 5 )
74+ cluster = AsyncCluster (["127.0.0.1 " ], protocol_version = 5 )
7575 yield cluster
7676 await cluster .shutdown ()
77+ # Give extra time for driver's internal threads to fully stop
78+ # This prevents "cannot schedule new futures after shutdown" errors
79+ await asyncio .sleep (2 )
7780
7881
7982@pytest .fixture
@@ -91,6 +94,8 @@ async def isolated_session(cassandra_cluster):
9194 # Cleanup
9295 await cleanup_keyspace (session , keyspace )
9396 await session .close ()
97+ # Give time for session cleanup
98+ await asyncio .sleep (1 )
9499
95100
96101@pytest .fixture
Original file line number Diff line number Diff line change @@ -123,6 +123,8 @@ async def unique_test_keyspace(cassandra_container):
123123 await cleanup_keyspace (session , keyspace )
124124 await session .close ()
125125 await cluster .shutdown ()
126+ # Give extra time for driver's internal threads to fully stop
127+ await asyncio .sleep (2 )
126128
127129
128130@pytest_asyncio .fixture
You can’t perform that action at this time.
0 commit comments