summaryrefslogtreecommitdiff
path: root/jstests/tool
diff options
context:
space:
mode:
authorAdam Midvidy <amidvidy@gmail.com>2014-11-04 17:39:01 -0500
committerBenety Goh <benety@mongodb.com>2014-11-04 21:43:06 -0500
commit3af62b6af0bcca2adc67c2367debf43e6d99688f (patch)
tree01d04d192264a8249be6937e428ecd11ef6d9088 /jstests/tool
parent852dc8839cebeb425fb668d2e043f23d7de67e54 (diff)
downloadmongo-3af62b6af0bcca2adc67c2367debf43e6d99688f.tar.gz
SERVER-15960 dumpfilename1.js test should not depend on single-threaded semantics
Closes #858 Signed-off-by: Benety Goh <benety@mongodb.com>
Diffstat (limited to 'jstests/tool')
-rw-r--r--jstests/tool/dumpfilename1.js17
1 files changed, 3 insertions, 14 deletions
diff --git a/jstests/tool/dumpfilename1.js b/jstests/tool/dumpfilename1.js
index 3cb2a26c6e4..38b430896bf 100644
--- a/jstests/tool/dumpfilename1.js
+++ b/jstests/tool/dumpfilename1.js
@@ -1,24 +1,13 @@
//dumpfilename1.js
-//Test designed to make sure error that dumping a collection with "/" in the name doesn't crash the system.
-//An error is logged and given to the user, but the other collections should dump and restore OK.
+//Test designed to make sure error that dumping a collection with "/" fails
t = new ToolTest( "dumpfilename1" );
t.startDB( "foo" );
+
c = t.db;
assert.writeOK(c.getCollection("df/").insert({ a: 3 }));
-assert.writeOK(c.getCollection("df").insert({ a: 2 }));
-
-t.runTool( "dump" , "--out" , t.ext );
-
-assert(c.getCollection("df/").drop(),"cannot drop 1");
-assert(c.getCollection("df").drop(), "cannot drop 2");
-
-t.runTool( "restore" , "--dir" , t.ext );
-
-assert.eq( 0 , c.getCollection("df/").count() , "collection 1 does not restore properly" );
-assert.eq( 1 , c.getCollection("df").count() , "collection 2 does not restore properly" );
-
+assert(t.runTool( "dump" , "--out" , t.ext ) != 0, "dump should fail with non-zero return code")
t.stop();