PYTHON-5631 - test_direct_client_maintains_pool_to_arbiter waits instead of asserting

This commit is contained in:
Noah Stapp 2026-05-07 16:20:35 -04:00
parent 0adf6df131
commit 37f64dc0fb
2 changed files with 2 additions and 2 deletions

View File

@ -2715,7 +2715,7 @@ class TestClientPool(AsyncMockClientTest):
await listener.async_wait_for_event(monitoring.ConnectionReadyEvent, 1)
self.assertEqual(listener.event_count(monitoring.ConnectionCreatedEvent), 1)
arbiter = c._topology.get_server_by_address(("c", 3))
self.assertEqual(len(arbiter.pool.conns), 1)
await async_wait_until(lambda: len(arbiter.pool.conns) == 1, "create 1 pooled connection")
# Arbiter pool is marked ready.
self.assertEqual(listener.event_count(monitoring.PoolReadyEvent), 1)

View File

@ -2670,7 +2670,7 @@ class TestClientPool(MockClientTest):
listener.wait_for_event(monitoring.ConnectionReadyEvent, 1)
self.assertEqual(listener.event_count(monitoring.ConnectionCreatedEvent), 1)
arbiter = c._topology.get_server_by_address(("c", 3))
self.assertEqual(len(arbiter.pool.conns), 1)
wait_until(lambda: len(arbiter.pool.conns) == 1, "create 1 pooled connection")
# Arbiter pool is marked ready.
self.assertEqual(listener.event_count(monitoring.PoolReadyEvent), 1)