summaryrefslogtreecommitdiff
path: root/jstests/replsets/drain.js
diff options
context:
space:
mode:
authorhari devaraj <hari.devaraj@10gen.com>2016-06-17 15:53:36 -0400
committerhari devaraj <hari.devaraj@10gen.com>2016-06-17 15:53:36 -0400
commitdd7e05dbde9f1e9554ad93cada8fb4d5dcbe11de (patch)
treeab3a7e1a042889116b9d34e0807fd552d0a47b7a /jstests/replsets/drain.js
parent50dd7b8ec787beb79ad9c182a480734169d96b8e (diff)
downloadmongo-dd7e05dbde9f1e9554ad93cada8fb4d5dcbe11de.tar.gz
SERVER-21432 Allowed slaveOk reads when node is in drain mode
Diffstat (limited to 'jstests/replsets/drain.js')
-rw-r--r--jstests/replsets/drain.js10
1 files changed, 1 insertions, 9 deletions
diff --git a/jstests/replsets/drain.js b/jstests/replsets/drain.js
index 6561bba8ce6..a81d45f1d10 100644
--- a/jstests/replsets/drain.js
+++ b/jstests/replsets/drain.js
@@ -75,15 +75,7 @@
"find failed with unexpected error code: " + tojson(res));
// Nor should it be readable with the slaveOk bit.
secondary.slaveOk = true;
- res = secondary.getDB("foo").runCommand({find: "foo"});
- assert.commandFailed(res);
- assert.eq(ErrorCodes.NotMasterOrSecondary,
- res.code,
- "find failed with unexpected error code: " + tojson(res));
- secondary.slaveOk = false;
-
- // check to make sure reads are not possible during draining
- assert.eq('node is in drain mode', res.errmsg);
+ assert.commandWorked(secondary.getDB("foo").runCommand({find: "foo"}));
assert.commandFailedWithCode(
secondary.adminCommand({