Permalink
Browse files

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.
  • Loading branch information...
1 parent e4d9af2 commit 3076a2113e54fd2d7d2f740f5e4ad578e77585b9 @ajdavis ajdavis committed Mar 10, 2014
Showing with 1 addition and 1 deletion.
  1. +1 −1 test/test_gridfs.py
View
2 test/test_gridfs.py
@@ -441,7 +441,7 @@ def test_gridfs_secondary_lazy(self):
_connect=False)
# Still no connection.
- fs = gridfs.GridFS(client.pymongo_test, _connect=False)
+ fs = gridfs.GridFS(client.test_gridfs_secondary_lazy, _connect=False)
# Connects, doesn't create index.
self.assertRaises(NoFile, fs.get_last_version)

0 comments on commit 3076a21

Please sign in to comment.