Skip to content

PYTHON-2634 Skip arbiter tests when no server is running #611

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 27, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion test/test_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -1964,6 +1964,7 @@ def timeout_task():

class TestClientPool(MockClientTest):

@client_context.require_connection
def test_rs_client_does_not_maintain_pool_to_arbiters(self):
listener = CMAPListener()
c = MockClient(
Expand Down Expand Up @@ -1993,6 +1994,7 @@ def test_rs_client_does_not_maintain_pool_to_arbiters(self):
arbiter = c._topology.get_server_by_address(('d', 4))
self.assertFalse(arbiter.pool.sockets)

@client_context.require_connection
def test_direct_client_maintains_pool_to_arbiter(self):
listener = CMAPListener()
c = MockClient(
Expand All @@ -2007,7 +2009,6 @@ def test_direct_client_maintains_pool_to_arbiter(self):
)
self.addCleanup(c.close)

print(c.topology_description)
wait_until(lambda: len(c.nodes) == 1, 'connect')
self.assertEqual(c.address, ('c', 3))
# Assert that we create 1 pooled connection.
Expand Down