summaryrefslogtreecommitdiff
path: root/jstests/gle
diff options
context:
space:
mode:
authorSpencer T Brody <spencer@mongodb.com>2014-12-04 16:20:06 -0500
committerSpencer T Brody <spencer@mongodb.com>2014-12-04 19:21:40 -0500
commitb766e395167dc27ba4fb3f9c0e4af3b4ad1cdace (patch)
tree8219d19306ab068e2aeb953c707cbb0c8a68fa21 /jstests/gle
parent1b830759eaefc56f5b9f93afa8016db07d950196 (diff)
downloadmongo-b766e395167dc27ba4fb3f9c0e4af3b4ad1cdace.tar.gz
SERVER-16420 Make gle/gle_sharded_wc.js test agnostic about who is elected primary
Diffstat (limited to 'jstests/gle')
-rw-r--r--jstests/gle/gle_sharded_wc.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/jstests/gle/gle_sharded_wc.js b/jstests/gle/gle_sharded_wc.js
index fac5303033a..bd4c52f64ae 100644
--- a/jstests/gle/gle_sharded_wc.js
+++ b/jstests/gle/gle_sharded_wc.js
@@ -66,7 +66,8 @@ assert.eq(coll.count(), 1);
//
// Successful remove on one shard, write concern timeout on the other
-st.rs0.stop(2);
+var s0Id = st.rs0.getNodeId(st.rs0.liveNodes.slaves[0]);
+st.rs0.stop(s0Id);
coll.remove({});
st.rs1.awaitReplication(); // To ensure the first shard won't timeout
printjson(gle = coll.getDB().runCommand({ getLastError : 1, w : 3, wtimeout : 5 * 1000 }));
@@ -79,7 +80,8 @@ assert.eq(coll.count(), 0);
//
// Successful remove on two hosts, write concern timeout on both
// We don't aggregate two timeouts together
-st.rs1.stop(2);
+var s1Id = st.rs1.getNodeId(st.rs1.liveNodes.slaves[0]);
+st.rs1.stop(s1Id);
// new writes to both shards to ensure that remove will do something on both of them
coll.insert({ _id : -1 });
coll.insert({ _id : 1 });