PYTHON-3725 Fix Test Failure - MockupDB test_network_disconnect_primary (#1222)
This commit is contained in:
parent
1ba4c0bcbd
commit
c7e06e6fc1
@ -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)
|
||||
|
||||
@ -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
|
||||
)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user