diff options
author | Eliot Horowitz <eliot@10gen.com> | 2010-08-02 17:15:44 -0400 |
---|---|---|
committer | Eliot Horowitz <eliot@10gen.com> | 2010-08-02 17:15:44 -0400 |
commit | dbc11f0fdfd943fbf7bdb21a9040be799a9b4f8e (patch) | |
tree | 8d1aa5a9e4e70d50d1678dca6af83296b9d227ee /jstests/replsets/replset2.js | |
parent | 5285a91815538649742edc16786937efe9656d3f (diff) | |
download | mongo-dbc11f0fdfd943fbf7bdb21a9040be799a9b4f8e.tar.gz |
fix w= on first batches for fresh slaves SERVER-1520
Diffstat (limited to 'jstests/replsets/replset2.js')
-rw-r--r-- | jstests/replsets/replset2.js | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/jstests/replsets/replset2.js b/jstests/replsets/replset2.js index a5f4c7f75f5..eaa35ee9b87 100644 --- a/jstests/replsets/replset2.js +++ b/jstests/replsets/replset2.js @@ -35,7 +35,7 @@ doTest = function( signal ) { var failed = false; var callGetLastError = function(w, timeout, db) { - var result = master.getDB(db).runCommand({getlasterror: 1, w: w, wtimeout: timeout}); + var result = master.getDB(db).getLastErrorObj( w , timeout ); printjson( result ); if(result['ok'] != 1) { print("FAILURE"); @@ -51,10 +51,14 @@ doTest = function( signal ) { master.getDB(testDB).foo.insert({n: 3}); callGetLastError(3, 10000, testDB); + print("**** TEMP 1a ****") + m1 = master.getDB(testDB).foo.findOne({n: 1}); printjson( m1 ); assert( m1['n'] == 1 , "Failed to save to master on multiple inserts"); + print("**** TEMP 1b ****") + var s0 = slaves[0].getDB(testDB).foo.findOne({n: 1}); assert( s0['n'] == 1 , "Failed to replicate to slave 0 on multiple inserts"); @@ -72,6 +76,7 @@ doTest = function( signal ) { printjson( m1 ); assert( m1['n'] == 1 , "Failed to save to master"); + var s0 = slaves[0].getDB(testDB).foo.findOne({n: 1}); assert( s0['n'] == 1 , "Failed to replicate to slave 0"); @@ -103,4 +108,4 @@ doTest = function( signal ) { replTest.stopSet( signal ); } -// doTest( 15 ); +doTest( 15 ); |