Skip to content

Commit 3076a21

Browse files
committed
Race condition in GridFS test.
test_gridfs_secondary_lazy asserts that get_last_version on a secondary raises NoFile. This fails if setUp()'s dropCollection command hasn't yet replicated: there's still a file on the secondary.
1 parent e4d9af2 commit 3076a21

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test/test_gridfs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -441,7 +441,7 @@ def test_gridfs_secondary_lazy(self):
441441
_connect=False)
442442

443443
# Still no connection.
444-
fs = gridfs.GridFS(client.pymongo_test, _connect=False)
444+
fs = gridfs.GridFS(client.test_gridfs_secondary_lazy, _connect=False)
445445

446446
# Connects, doesn't create index.
447447
self.assertRaises(NoFile, fs.get_last_version)

0 commit comments

Comments
 (0)