PYTHON-5631 - test_direct_client_maintains_pool_to_arbiter waits instead of asserting
This commit is contained in:
parent
0adf6df131
commit
37f64dc0fb
@ -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)
|
||||
|
||||
|
||||
@ -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)
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user