diff --git a/test/asynchronous/test_retryable_reads.py b/test/asynchronous/test_retryable_reads.py index d576f8987e..dbb5f5d4be 100644 --- a/test/asynchronous/test_retryable_reads.py +++ b/test/asynchronous/test_retryable_reads.py @@ -97,7 +97,6 @@ async def test_pool_paused_error_is_retryable(self): client = await self.async_rs_or_single_client( maxPoolSize=1, event_listeners=[cmap_listener, cmd_listener] ) - self.addAsyncCleanup(client.close) for _ in range(10): cmap_listener.reset() cmd_listener.reset() @@ -168,7 +167,6 @@ async def test_retryable_reads_in_sharded_cluster_multiple_available(self): for mongos in async_client_context.mongos_seeds().split(","): client = await self.async_rs_or_single_client(mongos) await async_set_fail_point(client, fail_command) - self.addAsyncCleanup(client.close) mongos_clients.append(client) listener = OvertCommandListener() diff --git a/test/test_retryable_reads.py b/test/test_retryable_reads.py index a6d56c8fad..87bb830c22 100644 --- a/test/test_retryable_reads.py +++ b/test/test_retryable_reads.py @@ -97,7 +97,6 @@ def test_pool_paused_error_is_retryable(self): client = self.rs_or_single_client( maxPoolSize=1, event_listeners=[cmap_listener, cmd_listener] ) - self.addCleanup(client.close) for _ in range(10): cmap_listener.reset() cmd_listener.reset() @@ -168,7 +167,6 @@ def test_retryable_reads_in_sharded_cluster_multiple_available(self): for mongos in client_context.mongos_seeds().split(","): client = self.rs_or_single_client(mongos) set_fail_point(client, fail_command) - self.addCleanup(client.close) mongos_clients.append(client) listener = OvertCommandListener()