diff options
author | Kaloian Manassiev <kaloian.manassiev@mongodb.com> | 2015-12-30 17:01:13 -0500 |
---|---|---|
committer | Kaloian Manassiev <kaloian.manassiev@mongodb.com> | 2015-12-30 17:09:28 -0500 |
commit | e49a2a16fb4b337d7ed1b0ec8d766f281741d8bf (patch) | |
tree | 7f0cac8cb50e56819bfe2546a525076976b1e193 /jstests/replsets/stepdown3.js | |
parent | 715e9e1cdc618dad480a7a1a73458daf6ea9ce0f (diff) | |
download | mongo-e49a2a16fb4b337d7ed1b0ec8d766f281741d8bf.tar.gz |
SERVER-22027 Sharding should not retry killed operations
This change introduces a different interruption code (11602) which will be
used to kill operations during replication primary stepdown so the config
server retry logic can differentiate them from user-killed operations.
Diffstat (limited to 'jstests/replsets/stepdown3.js')
-rw-r--r-- | jstests/replsets/stepdown3.js | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/jstests/replsets/stepdown3.js b/jstests/replsets/stepdown3.js index 9c3cf3d9544..65fa9d2df08 100644 --- a/jstests/replsets/stepdown3.js +++ b/jstests/replsets/stepdown3.js @@ -2,6 +2,8 @@ // // This test requires the fsync command to force a secondary to be stale. // @tags: [requires_fsync] +(function() { +'use strict'; var replTest = new ReplSetTest({ name: 'testSet', nodes: 2 }); var nodes = replTest.startSet(); @@ -37,8 +39,8 @@ print("getlasterror; should assert or return an error, depending on timing"); var gleFunction = function() { var result = master.getDB("test").runCommand({getLastError : 1, w: 2 , wtimeout :30000 }); if (result.errmsg === "not master" || - result.code == 10107 || - result.code == 11601 /*interrupted*/ ) { + result.code == ErrorCodes.NotMaster || + result.code == ErrorCodes.InterruptedDueToReplStateChange) { throw new Error("satisfy assert.throws()"); } print("failed to throw exception; GLE returned: "); @@ -54,3 +56,5 @@ assert.neq(0, exitCode, "expected replSetStepDown to close the shell's connectio // unlock and shut down printjson(locked.getDB("admin").fsyncUnlock()); replTest.stopSet(); + +})(); |