diff options
author | Suganthi Mani <suganthi.mani@mongodb.com> | 2019-03-14 17:25:48 -0400 |
---|---|---|
committer | Suganthi Mani <suganthi.mani@mongodb.com> | 2019-05-19 22:05:49 -0400 |
commit | 87c4ff3e8f939593c2ab0101f930648d8d208904 (patch) | |
tree | f1aa7b905e635cccbc0b358cb0b6090754a3d023 /jstests/libs | |
parent | 674276b0149d3b77b51ac46adc53b11c47a26519 (diff) | |
download | mongo-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.js | 8 |
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()); }); } |