Skip to content

Commit c7e06e6

Browse files
PYTHON-3725 Fix Test Failure - MockupDB test_network_disconnect_primary (#1222)
1 parent 1ba4c0b commit c7e06e6

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

doc/contributors.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,3 +95,4 @@ The following is a list of people who have contributed to
9595
- Ben Warner (bcwarner)
9696
- Jean-Christophe Fillion-Robin (jcfr)
9797
- Sean Cheah (thalassemia)
98+
- Dainis Gorbunovs (DainisGorbunovs)

test/mockupdb/test_network_disconnect_primary.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,12 @@ def test_network_disconnect_primary(self):
2626
# Application operation fails against primary. Test that topology
2727
# type changes from ReplicaSetWithPrimary to ReplicaSetNoPrimary.
2828
# http://bit.ly/1B5ttuL
29-
primary, secondary = servers = (MockupDB() for _ in range(2))
30-
for server in servers:
29+
primary, secondary = MockupDB(), MockupDB()
30+
for server in primary, secondary:
3131
server.run()
3232
self.addCleanup(server.stop)
3333

34-
hosts = [server.address_string for server in servers]
34+
hosts = [server.address_string for server in (primary, secondary)]
3535
primary_response = OpReply(
3636
ismaster=True, setName="rs", hosts=hosts, minWireVersion=2, maxWireVersion=6
3737
)

0 commit comments

Comments
 (0)