summaryrefslogtreecommitdiff
path: root/jstests/dur/a_quick.js
diff options
context:
space:
mode:
authorRandolph Tan <randolph@10gen.com>2014-04-25 14:04:36 -0400
committerRandolph Tan <randolph@10gen.com>2014-05-06 16:32:44 -0400
commit87dc3ae516e1d12a632dc604710661e38ed7b3dd (patch)
tree3a483a3d0c38ce00a7f4d7dba0e9cba7f7eba5f3 /jstests/dur/a_quick.js
parent6b945ec15c61f6bd4bfbaf382624d886ec8441d2 (diff)
downloadmongo-87dc3ae516e1d12a632dc604710661e38ed7b3dd.tar.gz
SERVER-13741 Migrate remaining tests to use write commands
Diffstat (limited to 'jstests/dur/a_quick.js')
-rwxr-xr-xjstests/dur/a_quick.js6
1 files changed, 2 insertions, 4 deletions
diff --git a/jstests/dur/a_quick.js b/jstests/dur/a_quick.js
index ab36f91327e..bbec8af6939 100755
--- a/jstests/dur/a_quick.js
+++ b/jstests/dur/a_quick.js
@@ -62,8 +62,7 @@ tst.log("start mongod without dur");
var conn = startMongodEmpty("--port", 30000, "--dbpath", path1, "--nodur");
tst.log("without dur work");
var d = conn.getDB("test");
-d.foo.insert({ _id:123 });
-d.getLastError();
+assert.writeOK(d.foo.insert({ _id: 123 }));
tst.log("stop without dur");
stopMongod(30000);
@@ -72,8 +71,7 @@ tst.log("start mongod with dur");
conn = startMongodEmpty("--port", 30001, "--dbpath", path2, "--dur", "--durOptions", 8);
tst.log("with dur work");
d = conn.getDB("test");
-d.foo.insert({ _id: 123 });
-d.getLastError(); // wait
+assert.writeOK(d.foo.insert({ _id: 123 }));
// we could actually do getlasterror fsync:1 now, but maybe this is agood
// as it will assure that commits happen on a timely basis. a bunch of the other dur/*js