diff options
author | Eliot Horowitz <eliot@10gen.com> | 2009-05-28 17:28:33 -0400 |
---|---|---|
committer | Eliot Horowitz <eliot@10gen.com> | 2009-05-28 17:28:33 -0400 |
commit | f3f213ad845693a63e0a60f330d19d367282c82f (patch) | |
tree | 006ca6829e15940911f525af452641f30faba80d /jstests/sharding/shard5.js | |
parent | 5c5dbc5a53b3cefc81c2cd623a7298165e94dc42 (diff) | |
download | mongo-f3f213ad845693a63e0a60f330d19d367282c82f.tar.gz |
use assert.soon so slow machines don't break things MINOR
Diffstat (limited to 'jstests/sharding/shard5.js')
-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(); |