summaryrefslogtreecommitdiff
path: root/jstests/libs
diff options
context:
space:
mode:
authorSuganthi Mani <suganthi.mani@mongodb.com>2019-03-14 17:25:48 -0400
committerSuganthi Mani <suganthi.mani@mongodb.com>2019-05-19 22:05:49 -0400
commit87c4ff3e8f939593c2ab0101f930648d8d208904 (patch)
treef1aa7b905e635cccbc0b358cb0b6090754a3d023 /jstests/libs
parent674276b0149d3b77b51ac46adc53b11c47a26519 (diff)
downloadmongo-87c4ff3e8f939593c2ab0101f930648d8d208904.tar.gz
SERVER-37574 Force reconfig should kill operations that conflict state
transition (primary to secondary/removed).
Diffstat (limited to 'jstests/libs')
-rw-r--r--jstests/libs/curop_helpers.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/jstests/libs/curop_helpers.js b/jstests/libs/curop_helpers.js
index fdd0508ba80..afb9b8c696e 100644
--- a/jstests/libs/curop_helpers.js
+++ b/jstests/libs/curop_helpers.js
@@ -1,14 +1,14 @@
// Wait until the current operation matches the filter.
function waitForCurOpByFilter(db, filter) {
+ const adminDB = db.getSiblingDB("admin");
assert.soon(
() => {
- return db.getSiblingDB("admin")
- .aggregate([{$currentOp: {}}, {$match: filter}])
- .itcount() == 1;
+ return adminDB.aggregate([{$currentOp: {}}, {$match: filter}]).itcount() == 1;
},
() => {
return "Failed to find a matching op for filter \"" + tojson(filter) +
- "\" in currentOp output: " + tojson(db.aggregate([{$currentOp: {}}]).toArray());
+ "\" in currentOp output: " +
+ tojson(adminDB.aggregate([{$currentOp: {}}]).toArray());
});
}