summaryrefslogtreecommitdiff
path: root/jstests/replsets/replset2.js
diff options
context:
space:
mode:
authorDwight <dwight@10gen.com>2010-08-23 15:03:34 -0400
committerDwight <dwight@10gen.com>2010-08-23 15:03:34 -0400
commit2f05a4caea0a10052f8db95b736e77628414715d (patch)
tree8586268bf5120d8891d138da3f36604b7ae45ab1 /jstests/replsets/replset2.js
parent50cb743634de0f84fc17d332cf7f23fa6a63df4b (diff)
downloadmongo-2f05a4caea0a10052f8db95b736e77628414715d.tar.gz
replset2 try to fix
Diffstat (limited to 'jstests/replsets/replset2.js')
-rw-r--r--jstests/replsets/replset2.js19
1 files changed, 12 insertions, 7 deletions
diff --git a/jstests/replsets/replset2.js b/jstests/replsets/replset2.js
index ff7fcfa9134..d9b19be105b 100644
--- a/jstests/replsets/replset2.js
+++ b/jstests/replsets/replset2.js
@@ -36,11 +36,17 @@ doTest = function (signal) {
var failed = false;
var callGetLastError = function (w, timeout, db) {
- var result = master.getDB(db).getLastErrorObj(w, timeout);
- print("replset2.js getLastError result: " + tojson(result));
- if (result['ok'] != 1) {
- print("replset2.js FAILURE getlasterror not ok");
- failed = true;
+ try {
+ var result = master.getDB(db).getLastErrorObj(w, timeout);
+ print("replset2.js getLastError result: " + tojson(result));
+ if (result['ok'] != 1) {
+ print("replset2.js FAILURE getlasterror not ok");
+ failed = true;
+ }
+ }
+ catch (e) {
+ print("\nreplset2.js exception in getLastError: " + e + '\n');
+ throw e;
}
}
@@ -58,7 +64,7 @@ doTest = function (signal) {
printjson(master.getDB("admin").runCommand("replSetGetStatus"));
- callGetLastError(3, 10000, testDB);
+ callGetLastError(3, 25000, testDB);
print("replset2.js **** TEMP 1a ****")
@@ -91,7 +97,6 @@ doTest = function (signal) {
var s1 = slaves[1].getDB(testDB).foo.findOne({ n: 1 });
assert(s1['n'] == 1, "replset2.js Failed to replicate to slave 1");
-
// Test getlasterror with large insert
print("replset2.js **** Try inserting many records ****")
bigData = new Array(2000).toString()