summaryrefslogtreecommitdiff
path: root/jstests/noPassthrough/failcommand_failpoint_not_parallel.js
diff options
context:
space:
mode:
Diffstat (limited to 'jstests/noPassthrough/failcommand_failpoint_not_parallel.js')
-rw-r--r--jstests/noPassthrough/failcommand_failpoint_not_parallel.js37
1 files changed, 18 insertions, 19 deletions
diff --git a/jstests/noPassthrough/failcommand_failpoint_not_parallel.js b/jstests/noPassthrough/failcommand_failpoint_not_parallel.js
index 2241dbe5d89..a9d776d0079 100644
--- a/jstests/noPassthrough/failcommand_failpoint_not_parallel.js
+++ b/jstests/noPassthrough/failcommand_failpoint_not_parallel.js
@@ -1,24 +1,23 @@
(function() {
- "use strict";
+"use strict";
- const conn = MongoRunner.runMongod();
- assert.neq(null, conn);
- const db = conn.getDB("test_failcommand_noparallel");
+const conn = MongoRunner.runMongod();
+assert.neq(null, conn);
+const db = conn.getDB("test_failcommand_noparallel");
- // Test times when closing connection.
- assert.commandWorked(db.adminCommand({
- configureFailPoint: "failCommand",
- mode: {times: 2},
- data: {
- closeConnection: true,
- failCommands: ["find"],
- }
- }));
- assert.throws(() => db.runCommand({find: "c"}));
- assert.throws(() => db.runCommand({find: "c"}));
- assert.commandWorked(db.runCommand({find: "c"}));
- assert.commandWorked(db.adminCommand({configureFailPoint: "failCommand", mode: "off"}));
-
- MongoRunner.stopMongod(conn);
+// Test times when closing connection.
+assert.commandWorked(db.adminCommand({
+ configureFailPoint: "failCommand",
+ mode: {times: 2},
+ data: {
+ closeConnection: true,
+ failCommands: ["find"],
+ }
+}));
+assert.throws(() => db.runCommand({find: "c"}));
+assert.throws(() => db.runCommand({find: "c"}));
+assert.commandWorked(db.runCommand({find: "c"}));
+assert.commandWorked(db.adminCommand({configureFailPoint: "failCommand", mode: "off"}));
+MongoRunner.stopMongod(conn);
}());