summaryrefslogtreecommitdiff
path: root/jstests/tool
diff options
context:
space:
mode:
authorEliot Horowitz <eliot@10gen.com>2009-08-28 13:35:08 -0400
committerEliot Horowitz <eliot@10gen.com>2009-08-28 13:35:08 -0400
commit41d2f24171a1aeb7db1b45d5303cb73a2662583e (patch)
tree46d78939890e80a732feb1ab277d71837c816f04 /jstests/tool
parentcd1fe6505a5c36a678b2f7c30cdb6ffdaea250a8 (diff)
downloadmongo-41d2f24171a1aeb7db1b45d5303cb73a2662583e.tar.gz
make tool test more reliable MINOR
Diffstat (limited to 'jstests/tool')
-rw-r--r--jstests/tool/tool1.js7
1 files changed, 4 insertions, 3 deletions
diff --git a/jstests/tool/tool1.js b/jstests/tool/tool1.js
index cb21d354b53..173981aa476 100644
--- a/jstests/tool/tool1.js
+++ b/jstests/tool/tool1.js
@@ -38,7 +38,8 @@ assert.lt( 10 , fileSize() , "file size changed" );
c.drop();
runMongoProgram( "mongoimportjson", "--host", "127.0.0.1:" + port, "-d", baseName, "-c", baseName, "--file", externalFile );
-assert( c.findOne() && 1 == c.findOne().a );
+assert.soon( "c.findOne()" , "mongo import json A" );
+assert( c.findOne() && 1 == c.findOne().a , "mongo import json B" );
stopMongod( port );
resetDbpath( externalPath );
@@ -48,7 +49,7 @@ resetDbpath( dbPath );
runMongoProgram( "mongorestore", "--dbpath", dbPath, "--dir", externalPath );
m = startMongoProgram( "mongod", "--port", port, "--dbpath", dbPath, "--nohttpinterface", "--bind_ip", "127.0.0.1" );
c = m.getDB( baseName ).getCollection( baseName );
-assert( c.findOne(), "object missing a" );
+assert.soon( "c.findOne()" , "object missing a" );
assert( 1 == c.findOne().a, "object wrong" );
stopMongod( port );
@@ -59,5 +60,5 @@ resetDbpath( dbPath );
runMongoProgram( "mongoimportjson", "--dbpath", dbPath, "-d", baseName, "-c", baseName, "--file", externalFile );
m = startMongoProgram( "mongod", "--port", port, "--dbpath", dbPath, "--nohttpinterface", "--bind_ip", "127.0.0.1" );
c = m.getDB( baseName ).getCollection( baseName );
-assert( c.findOne(), "object missing b" );
+assert.soon( "c.findOne()" , "object missing b" );
assert( 1 == c.findOne().a, "object wrong" );