summaryrefslogtreecommitdiff
path: root/jstests/replsets/initial_sync3.js
diff options
context:
space:
mode:
Diffstat (limited to 'jstests/replsets/initial_sync3.js')
-rw-r--r--jstests/replsets/initial_sync3.js8
1 files changed, 5 insertions, 3 deletions
diff --git a/jstests/replsets/initial_sync3.js b/jstests/replsets/initial_sync3.js
index ef45581d618..f63e79b868b 100644
--- a/jstests/replsets/initial_sync3.js
+++ b/jstests/replsets/initial_sync3.js
@@ -3,6 +3,7 @@
* Make sure member can't sync from a member with a different buildIndexes setting.
*/
+
load("jstests/replsets/rslib.js");
var name = "initialsync3";
var host = getHostName();
@@ -33,7 +34,6 @@ replTest.start(1);
print("make sure 1 does not become a secondary (because it cannot clone from 2)");
sleep(10000);
-reconnect(nodes[1]);
var result = nodes[1].getDB("admin").runCommand({isMaster : 1});
assert(!result.ismaster, tojson(result));
assert(!result.secondary, tojson(result));
@@ -66,7 +66,7 @@ try {
master.getDB("admin").runCommand({replSetReconfig : config});
}
catch(e) {
- print("trying to reconfigure: "+e);
+ assert((e.message || e) == "error doing query: failed");
}
// wait for a heartbeat, too, just in case sync happens before hb
@@ -93,8 +93,10 @@ rs2.partition(0, 2);
master.getDB("foo").bar.baz.insert({x:1});
rs2.awaitReplication();
+master = rs2.getMaster();
+
master.getDB("foo").bar.baz.insert({x:2});
-var x = master.getDB("foo").runCommand({getLastError : 1, w : 3, wtimeout : 5000});
+var x = master.getDB("foo").runCommand({getLastError : 1, w : 3, wtimeout : 60000});
printjson(x);
assert.eq(null, x.err);