summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEliot Horowitz <eliot@10gen.com>2009-05-28 17:28:33 -0400
committerEliot Horowitz <eliot@10gen.com>2009-05-28 17:28:33 -0400
commitf3f213ad845693a63e0a60f330d19d367282c82f (patch)
tree006ca6829e15940911f525af452641f30faba80d
parent5c5dbc5a53b3cefc81c2cd623a7298165e94dc42 (diff)
downloadmongo-f3f213ad845693a63e0a60f330d19d367282c82f.tar.gz
use assert.soon so slow machines don't break things MINOR
-rw-r--r--jstests/sharding/shard5.js8
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();