summaryrefslogtreecommitdiff
path: root/jstests/sharding/aggregation_currentop.js
diff options
context:
space:
mode:
authorJacob Evans <jacob.evans@10gen.com>2018-11-09 18:10:56 -0500
committerJacob Evans <jacob.evans@10gen.com>2019-01-08 13:03:46 -0500
commitd155173622a2160471610749eff59f7a15003489 (patch)
treeb7a23045b39b8799e63a13decb345351c7b6bf7e /jstests/sharding/aggregation_currentop.js
parent00728fb39267f5ca7c6bdc3bb69d2e445b5c3c29 (diff)
downloadmongo-d155173622a2160471610749eff59f7a15003489.tar.gz
SERVER-37947 Fail gracefully when explain is used in transactions
Diffstat (limited to 'jstests/sharding/aggregation_currentop.js')
-rw-r--r--jstests/sharding/aggregation_currentop.js11
1 files changed, 3 insertions, 8 deletions
diff --git a/jstests/sharding/aggregation_currentop.js b/jstests/sharding/aggregation_currentop.js
index f6f114f1e82..ef629106f23 100644
--- a/jstests/sharding/aggregation_currentop.js
+++ b/jstests/sharding/aggregation_currentop.js
@@ -331,20 +331,15 @@ TestData.skipAwaitingReplicationOnShardsBeforeCheckingUUIDs = true;
}));
// Test that $currentOp fails if a non-local readConcern is specified for any data-bearing
- // target. When run on a mongoS with {localOps:true}, read concern is not applicable and is
- // therefore ignored.
+ // target.
const linearizableAggCmd = {
aggregate: 1,
pipeline: [{$currentOp: curOpSpec}],
readConcern: {level: "linearizable"},
cursor: {}
};
- if (isLocalMongosCurOp) {
- assert.commandWorked(adminDB.runCommand(linearizableAggCmd));
- } else {
- assert.commandFailedWithCode(adminDB.runCommand(linearizableAggCmd),
- ErrorCodes.InvalidOptions);
- }
+ assert.commandFailedWithCode(adminDB.runCommand(linearizableAggCmd),
+ ErrorCodes.InvalidOptions);
// Test that {idleConnections: false} returns only active connections.
const idleConn = new Mongo(conn.host);