diff options
author | Randolph Tan <randolph@10gen.com> | 2012-08-07 17:55:34 -0400 |
---|---|---|
committer | Randolph Tan <randolph@10gen.com> | 2012-08-07 22:40:10 -0400 |
commit | 3eec537d7e9534065a3fce91382da32b2769d204 (patch) | |
tree | 1d41b947f1525f8bbc9bd6548cb08f773fa5abcb /jstests/repl | |
parent | b6bfcd495a785b1f9e016a54f748e8167b2702d1 (diff) | |
download | mongo-3eec537d7e9534065a3fce91382da32b2769d204.tar.gz |
Buildbot fix for SERVER-6702
Make sure to turn journaling on if we are going to kill a mongod process with SIGKILL with an expectation that it will be running fine after a restart on our tests.
Diffstat (limited to 'jstests/repl')
-rw-r--r-- | jstests/repl/repl2.js | 8 | ||||
-rw-r--r-- | jstests/repl/repl5.js | 8 | ||||
-rw-r--r-- | jstests/repl/repl7.js | 8 | ||||
-rw-r--r-- | jstests/repl/repl_auth.js | 12 |
4 files changed, 20 insertions, 16 deletions
diff --git a/jstests/repl/repl2.js b/jstests/repl/repl2.js index b290c618031..cafac4beedb 100644 --- a/jstests/repl/repl2.js +++ b/jstests/repl/repl2.js @@ -8,14 +8,14 @@ soonCount = function( count ) { } ); } -doTest = function( signal ) { +doTest = function(signal, extraOpts) { print("signal: "+signal); var rt = new ReplTest( "repl2tests" ); // implicit small oplog makes slave get out of sync m = rt.start( true, { oplogSize : "1" } ); - s = rt.start( false ); + s = rt.start(false, extraOpts); am = m.getDB("foo").a @@ -28,7 +28,7 @@ doTest = function( signal ) { for( i = 0; i < 1000; ++i ) am.save( { _id: new ObjectId(), i: i, b: big } ); - s = rt.start( false , null , true ); + s = rt.start(false, extraOpts, true); print("earliest op in master: "+tojson(m.getDB("local").oplog.$main.find().sort({$natural:1}).limit(1).next())); print("latest op on slave: "+tojson(s.getDB("local").sources.findOne())); @@ -53,4 +53,4 @@ doTest = function( signal ) { } doTest( 15 ); // SIGTERM -doTest( 9 ); // SIGKILL +doTest(9, { journal: null }); // SIGKILL diff --git a/jstests/repl/repl5.js b/jstests/repl/repl5.js index b9bcef9aaa3..eda48496656 100644 --- a/jstests/repl/repl5.js +++ b/jstests/repl/repl5.js @@ -7,7 +7,7 @@ soonCountAtLeast = function( db, coll, count ) { } ); } -doTest = function( signal ) { +doTest = function(signal, extraOpts) { rt = new ReplTest( "repl5tests" ); @@ -17,11 +17,11 @@ doTest = function( signal ) { for( i = 0; i < 10000; ++i ) ma.save( { i:i } ); - s = rt.start( false ); + s = rt.start(false, extraOpts); soonCountAtLeast( "a", "a", 1 ); rt.stop( false, signal ); - s = rt.start( false, null, true ); + s = rt.start(false, extraOpts, true); sleep( 1000 ); soonCountAtLeast( "a", "a", 10000 ); @@ -29,4 +29,4 @@ doTest = function( signal ) { } doTest( 15 ); // SIGTERM -doTest( 9 ); // SIGKILL +doTest(9, { journal: null }); // SIGKILL diff --git a/jstests/repl/repl7.js b/jstests/repl/repl7.js index e3fdee9dd99..8cdbaac9f68 100644 --- a/jstests/repl/repl7.js +++ b/jstests/repl/repl7.js @@ -1,6 +1,6 @@ // Test persistence of list of dbs to add. -doTest = function( signal ) { +doTest = function(signal, extraOpts) { rt = new ReplTest( "repl7tests" ); @@ -10,7 +10,7 @@ doTest = function( signal ) { m.getDB( n ).a.save( {x:1} ); } - s = rt.start( false ); + s = rt.start(false, extraOpts); assert.soon( function() { return -1 != s.getDBNames().indexOf( "aa" ); @@ -18,7 +18,7 @@ doTest = function( signal ) { rt.stop( false, signal ); - s = rt.start( false, null, signal ); + s = rt.start(false, extraOpts, signal); assert.soon( function() { for( n = "a"; n != "aaaaa"; n += "a" ) { @@ -42,4 +42,4 @@ doTest = function( signal ) { } doTest( 15 ); // SIGTERM -doTest( 9 ); // SIGKILL +doTest(9, { journal: null }); // SIGKILL diff --git a/jstests/repl/repl_auth.js b/jstests/repl/repl_auth.js index 95b5811ab4b..c914fdfd4a5 100644 --- a/jstests/repl/repl_auth.js +++ b/jstests/repl/repl_auth.js @@ -12,7 +12,7 @@ auth = function( n ) { return n.getDB( baseName ).auth( "test", "test" ); } -doTest = function( signal ) { +doTest = function(signal, extraOpts) { rt = new ReplTest( baseName ); @@ -27,7 +27,11 @@ doTest = function( signal ) { m = rt.start( true, { auth:null }, true ); auth( m ); - s = rt.start( false, { auth:null }, true ); + + var slaveOpt = { auth: null }; + slaveOpt = Object.extend(slaveOpt, extraOpts); + + s = rt.start( false, slaveOpt, true ); assert.soon( function() { return auth( s ); } ); ma = m.getDB( baseName ).a; @@ -42,7 +46,7 @@ doTest = function( signal ) { rt.stop( false, signal ); ma.save( {} ); - s = rt.start( false, { auth:null }, true ); + s = rt.start(false, slaveOpt, true); assert.soon( function() { return auth( s ); } ); sa = s.getDB( baseName ).a; assert.soon( function() { return 2 == sa.count(); } ); @@ -60,4 +64,4 @@ doTest = function( signal ) { } doTest( 15 ); // SIGTERM -doTest( 9 ); // SIGKILL +doTest(9, { journal: null }); // SIGKILL |