summaryrefslogtreecommitdiff
path: root/jstests/sharding/kill_op_overflow.js
diff options
context:
space:
mode:
authorSpencer Jackson <spencer.jackson@mongodb.com>2016-07-25 14:27:12 -0400
committerSpencer Jackson <spencer.jackson@mongodb.com>2016-07-26 12:45:54 -0400
commit3f89dad8fd25ffb5774bf53385bd4a02d45a4dfe (patch)
tree9d9e183925a5f99fb3d466085e2c16c149dd7d7e /jstests/sharding/kill_op_overflow.js
parentfcc3d58b5b4c9cf8da18021e30175aa66db9845b (diff)
downloadmongo-3f89dad8fd25ffb5774bf53385bd4a02d45a4dfe.tar.gz
SERVER-25258: Improve mongos killOp opID parsing
Diffstat (limited to 'jstests/sharding/kill_op_overflow.js')
-rw-r--r--jstests/sharding/kill_op_overflow.js11
1 files changed, 11 insertions, 0 deletions
diff --git a/jstests/sharding/kill_op_overflow.js b/jstests/sharding/kill_op_overflow.js
new file mode 100644
index 00000000000..0a4231f5753
--- /dev/null
+++ b/jstests/sharding/kill_op_overflow.js
@@ -0,0 +1,11 @@
+/**
+ * This test asserts that an illegal OpID passed to mongos' implementation of killOp results in a
+ * failure being propagated back to the client.
+ */
+(function() {
+ "use strict";
+ var st = new ShardingTest({name: "shard1", shards: 1, mongos: 1});
+
+ assert.commandFailed(
+ st.s.getDB("admin").runCommand({killOp: 1, op: "shard0000:99999999999999999999999"}));
+})();