diff options
Diffstat (limited to 'jstests/repl/repl7.js')
-rw-r--r-- | jstests/repl/repl7.js | 65 |
1 files changed, 33 insertions, 32 deletions
diff --git a/jstests/repl/repl7.js b/jstests/repl/repl7.js index 2907acc087c..790aef03420 100644 --- a/jstests/repl/repl7.js +++ b/jstests/repl/repl7.js @@ -11,44 +11,45 @@ var getDBNamesNoThrow = function(conn) { doTest = function(signal, extraOpts) { - rt = new ReplTest( "repl7tests" ); - - m = rt.start( true ); + rt = new ReplTest("repl7tests"); - for( n = "a"; n != "aaaaa"; n += "a" ) { - m.getDB( n ).a.save( {x:1} ); + m = rt.start(true); + + for (n = "a"; n != "aaaaa"; n += "a") { + m.getDB(n).a.save({x: 1}); } s = rt.start(false, extraOpts); - - assert.soon( function() { - return -1 != getDBNamesNoThrow(s).indexOf( "aa" ); - }, "aa timeout", 60000, 1000 ); - - rt.stop( false, signal ); + + assert.soon(function() { + return -1 != getDBNamesNoThrow(s).indexOf("aa"); + }, "aa timeout", 60000, 1000); + + rt.stop(false, signal); s = rt.start(false, extraOpts, signal); - - assert.soon( function() { - for( n = "a"; n != "aaaaa"; n += "a" ) { - if ( -1 == getDBNamesNoThrow(s).indexOf( n ) ) - return false; - } - return true; - }, "a-aaaa timeout", 60000, 1000 ); - - assert.soon( function() { - for( n = "a"; n != "aaaaa"; n += "a" ) { - if ( 1 != m.getDB( n ).a.find().count() ) { - return false; - } - } - return true; }, "a-aaaa count timeout" ); - - sleep( 300 ); - + + assert.soon(function() { + for (n = "a"; n != "aaaaa"; n += "a") { + if (-1 == getDBNamesNoThrow(s).indexOf(n)) + return false; + } + return true; + }, "a-aaaa timeout", 60000, 1000); + + assert.soon(function() { + for (n = "a"; n != "aaaaa"; n += "a") { + if (1 != m.getDB(n).a.find().count()) { + return false; + } + } + return true; + }, "a-aaaa count timeout"); + + sleep(300); + rt.stop(); }; -doTest( 15 ); // SIGTERM -doTest(9, { journal: null }); // SIGKILL +doTest(15); // SIGTERM +doTest(9, {journal: null}); // SIGKILL |