PYTHON-3725 Fix Test Failure - MockupDB test_network_disconnect_primary (#1222)

This commit is contained in:
Dainis Gorbunovs 2023-06-06 00:38:28 +01:00 committed by GitHub
parent 1ba4c0bcbd
commit c7e06e6fc1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 3 deletions

View File

@ -95,3 +95,4 @@ The following is a list of people who have contributed to
- Ben Warner (bcwarner)
- Jean-Christophe Fillion-Robin (jcfr)
- Sean Cheah (thalassemia)
- Dainis Gorbunovs (DainisGorbunovs)

View File

@ -26,12 +26,12 @@ class TestNetworkDisconnectPrimary(unittest.TestCase):
# Application operation fails against primary. Test that topology
# type changes from ReplicaSetWithPrimary to ReplicaSetNoPrimary.
# http://bit.ly/1B5ttuL
primary, secondary = servers = (MockupDB() for _ in range(2))
for server in servers:
primary, secondary = MockupDB(), MockupDB()
for server in primary, secondary:
server.run()
self.addCleanup(server.stop)
hosts = [server.address_string for server in servers]
hosts = [server.address_string for server in (primary, secondary)]
primary_response = OpReply(
ismaster=True, setName="rs", hosts=hosts, minWireVersion=2, maxWireVersion=6
)