diff options
author | agirbal <antoine@10gen.com> | 2011-10-18 16:26:17 -0700 |
---|---|---|
committer | agirbal <antoine@10gen.com> | 2011-10-18 16:26:17 -0700 |
commit | c9b4c08409b4de2c0a030c455de607966b3761c7 (patch) | |
tree | 1f4e5fc05924f2b70509b0dcc64781b50778532d /jstests/repl | |
parent | 00752854b568832b8df39ba301205d762b199c5b (diff) | |
download | mongo-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.js | 8 |
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) { |