summaryrefslogtreecommitdiff
path: root/jstests/repl
diff options
context:
space:
mode:
authoragirbal <antoine@10gen.com>2011-10-18 16:26:17 -0700
committeragirbal <antoine@10gen.com>2011-10-18 16:26:17 -0700
commitc9b4c08409b4de2c0a030c455de607966b3761c7 (patch)
tree1f4e5fc05924f2b70509b0dcc64781b50778532d /jstests/repl
parent00752854b568832b8df39ba301205d762b199c5b (diff)
downloadmongo-c9b4c08409b4de2c0a030c455de607966b3761c7.tar.gz
fixing jstests/repl/drop_dups.js race condition due to replication
Diffstat (limited to 'jstests/repl')
-rw-r--r--jstests/repl/drop_dups.js8
1 files changed, 5 insertions, 3 deletions
diff --git a/jstests/repl/drop_dups.js b/jstests/repl/drop_dups.js
index 100f469e257..f4f89b5d5c1 100644
--- a/jstests/repl/drop_dups.js
+++ b/jstests/repl/drop_dups.js
@@ -30,12 +30,14 @@ function run( createInBackground ) {
block();
- am.runCommand( { "godinsert" : collName , obj : { _id : 100 , x : 20 } } );
- am.runCommand( { "godinsert" : collName , obj : { _id : 101 , x : 20 } } );
-
as.runCommand( { "godinsert" : collName , obj : { _id : 101 , x : 20 } } );
as.runCommand( { "godinsert" : collName , obj : { _id : 100 , x : 20 } } );
+ as.getLastError();
+ am.runCommand( { "godinsert" : collName , obj : { _id : 100 , x : 20 } } );
+ am.runCommand( { "godinsert" : collName , obj : { _id : 101 , x : 20 } } );
+ am.getLastError();
+
assert.eq( as[collName].count() , am[collName].count() );
function mymap(z) {