diff options
author | Eric Milkie <milkie@10gen.com> | 2015-09-28 16:33:35 -0400 |
---|---|---|
committer | Eric Milkie <milkie@10gen.com> | 2015-09-28 16:33:35 -0400 |
commit | 1aece4e856d1aa56b9b693464c85eb2b4270a954 (patch) | |
tree | 376e48f5944c5f160d82ca78780aeb7e925cc531 /jstests/replsets/drain.js | |
parent | a66900463b43321925b0b4762d258947335ab158 (diff) | |
download | mongo-1aece4e856d1aa56b9b693464c85eb2b4270a954.tar.gz |
Revert "SERVER-20649 add slaveOk read test coverage for drain mode"
This reverts commit 2d5555b6a942aeb7de0370c67c974cdbb5f40ab5.
Diffstat (limited to 'jstests/replsets/drain.js')
-rw-r--r-- | jstests/replsets/drain.js | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/jstests/replsets/drain.js b/jstests/replsets/drain.js index b18f16c2751..127b5835999 100644 --- a/jstests/replsets/drain.js +++ b/jstests/replsets/drain.js @@ -4,8 +4,7 @@ // 3. Insert data to ensure the SECONDARY has ops to apply in its queue. // 4. Shutdown PRIMARY. // 5. Wait for SECONDARY to become PRIMARY. -// 6. Confirm that the new PRIMARY cannot accept writes while in drain mode. -// 6a. Confirm that the new PRIMARY cannot accept non-slaveOK reads while in drain mode. +// 6. Confirm that the new PRIMARY cannot accept writes until its queue is empty. // 7. Enable applying ops. // 8. Ensure the ops in queue are applied and that the PRIMARY begins to accept writes as usual. @@ -63,14 +62,6 @@ assert.writeError(secondary.getDB("foo").flag.insert({sentinel:2})); assert(!secondary.getDB("admin").runCommand({"isMaster": 1}).ismaster); - // Ensure new primary is not yet readable without slaveOk bit. - jsTestLog('New primary should not be readable yet, without slaveOk bit'); - assert.throws(function() { secondary.getDB("foo").foo.find({ big: 1 }).next(); }); - // But can read if slaveOk. - secondary.slaveOk = true; - assert.eq(1, secondary.getDB("foo").foo.find().itcount()); - secondary.slaveOk = false; - // Allow draining to complete jsTestLog('Enabling fail point on new primary to allow draining to complete'); assert.commandWorked( |