diff options
-rw-r--r-- | jstests/sharding/shard5.js | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/jstests/sharding/shard5.js b/jstests/sharding/shard5.js index 2553b8e8c84..e8ed4925328 100644 --- a/jstests/sharding/shard5.js +++ b/jstests/sharding/shard5.js @@ -40,7 +40,11 @@ print( "* A" ); assert.eq( 7 , s.getDB( "test" ).foo.find().toArray().length , "normal B 1" ); s2.getDB( "test" ).foo.save( { num : 2 } ); -sleep( 500 ); // give the write back time to happen -assert.eq( 8 , s2.getDB( "test" ).foo.find().toArray().length , "other B 2" ); + +assert.soon( + function(){ + return 8 == s2.getDB( "test" ).foo.find().toArray().length; + } , "other B 2" , 5000 , 100 ) + s.stop(); |