diff options
author | Max Hirschhorn <max.hirschhorn@mongodb.com> | 2015-06-23 22:22:52 -0400 |
---|---|---|
committer | Max Hirschhorn <max.hirschhorn@mongodb.com> | 2015-06-23 22:22:52 -0400 |
commit | dd0c8d73aad862770866a65f5494e51620edfc7e (patch) | |
tree | 316ecff8aa38cf478ebf53a38097d73035ad32a9 /jstests/dur | |
parent | cb23019011883f3c5f0ce0876248e80f05de4581 (diff) | |
download | mongo-dd0c8d73aad862770866a65f5494e51620edfc7e.tar.gz |
SERVER-18868 Check the exit code of the parallel shell.
By default the await function returned by startParallelShell() asserts
that the exit code is zero.
Diffstat (limited to 'jstests/dur')
-rw-r--r-- | jstests/dur/closeall.js | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/jstests/dur/closeall.js b/jstests/dur/closeall.js index 44ff1cb7c2b..937c9c34a4b 100644 --- a/jstests/dur/closeall.js +++ b/jstests/dur/closeall.js @@ -39,16 +39,17 @@ function f(variant, quickCommits, paranoid) { print("initial sync done") var writeOps = startParallelShell('var coll = db.getSiblingDB("' + ourdb + '").foo; \ - var bulk = coll.initializeUnorderedBulkOp(); \ for( var i = 0; i < ' + N + '; i++ ) { \ + var bulk = coll.initializeUnorderedBulkOp(); \ bulk.insert({ x: 1 }); \ if ( i % 7 == 0 ) \ bulk.insert({ x: 99, y: 2 }); \ if ( i % 49 == 0 ) \ bulk.find({ x: 99 }).update( \ - { a: 1, b: 2, c: 3, d: 4 }); \ + { $set: { a: 1, b: 2, c: 3, d: 4 }}); \ if( i == 800 ) \ coll.ensureIndex({ x: 1 }); \ + assert.writeOK(bulk.execute()); \ }', conn.port); for( var i = 0; i < N; i++ ) { @@ -80,14 +81,14 @@ function f(variant, quickCommits, paranoid) { assert( res.ok, "dropDatabase res.ok=false"); } + writeOps(); + print("closeall.js end test loop. slave.foo.count:"); print(slave.foo.count()); print("closeall.js shutting down servers"); MongoRunner.stopMongod(connSlave); MongoRunner.stopMongod(conn); - - writeOps(); } // Skip this test on 32-bit Windows (unfixable failures in MapViewOfFileEx) |