Files
mongo/jstests/core/shellstartparallel.js
Max Hirschhorn 9ad8d6335f SERVER-40076 Tag JS tests with reason they're unable to run in Atlas.
There are likely more JavaScript tests which have been added since
r3.6.9 that still need to be tagged.

(cherry picked from commit 05ec08fa62)
2019-03-11 18:17:29 -04:00

24 lines
701 B
JavaScript

// @tags: [
// requires_fastcount,
// uses_multiple_connections,
// ]
function f() {
throw Error("intentional_throw_to_test_assert_throws");
}
assert.throws(f);
// verify that join works
db.sps.drop();
var awaitShell = startParallelShell("sleep(1000); db.sps.insert({x:1});");
awaitShell();
assert.eq(1, db.sps.count(), "join problem?");
// test with a throw
awaitShell = startParallelShell("db.sps.insert({x:1}); throw Error('intentionally_uncaught');");
var exitCode = awaitShell({checkExitSuccess: false});
assert.neq(0, exitCode, "expected shell to exit abnormally due to an uncaught exception");
assert.eq(2, db.sps.count(), "join2 problem?");
print("shellstartparallel.js SUCCESS");