summaryrefslogtreecommitdiff
path: root/jstests/replsets/replset1.js
diff options
context:
space:
mode:
authorKristina <kristina@10gen.com>2011-01-14 15:44:15 -0500
committerKristina <kristina@10gen.com>2011-01-14 15:44:15 -0500
commit4ebc3250853cfc532220961152629674e43cbd5e (patch)
tree957ec69b2c1e5f2adf11009e2299a46e9c479841 /jstests/replsets/replset1.js
parenta7e51ea6742f63abbe939e4e493329bf390777c8 (diff)
downloadmongo-4ebc3250853cfc532220961152629674e43cbd5e.tar.gz
Revert "fix replset1"
This reverts commit 3e4bec745d40e97cbcf2bd8f44b4437132009270.
Diffstat (limited to 'jstests/replsets/replset1.js')
-rw-r--r--jstests/replsets/replset1.js14
1 files changed, 6 insertions, 8 deletions
diff --git a/jstests/replsets/replset1.js b/jstests/replsets/replset1.js
index 512e863908c..ed86bf42d29 100644
--- a/jstests/replsets/replset1.js
+++ b/jstests/replsets/replset1.js
@@ -55,10 +55,10 @@ doTest = function( signal ) {
var new_master = false;
while (!new_master) {
try {
- new_master = replTest.getMaster();
+ var new_master = replTest.getMaster();
}
catch (e) {
- print("e: "+e);
+ print(e);
}
}
@@ -66,19 +66,17 @@ doTest = function( signal ) {
var new_master_id = replTest.getNodeId( new_master );
assert( master_id != new_master_id, "Old master shouldn't be equal to new master." );
- var count = 0;
- while (count < 3) {
+
+ {
// this may fail since it has to reconnect
try {
cppconn.foo.findOne()
}
catch ( e ){
- print("e: "+e);
}
- count++;
- }
- assert.eq( 1000 , cppconn.foo.findOne().a , "cppconn 2" );
+ assert.eq( 1000 , cppconn.foo.findOne().a , "cppconn 2" );
+ }
// Now let's write some documents to the new master
for(var i=0; i<1000; i++) {