diff options
Diffstat (limited to 'jstests/replsets/replsetrestart1.js')
-rw-r--r-- | jstests/replsets/replsetrestart1.js | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/jstests/replsets/replsetrestart1.js b/jstests/replsets/replsetrestart1.js index cb32c178e11..0224d0f47c7 100644 --- a/jstests/replsets/replsetrestart1.js +++ b/jstests/replsets/replsetrestart1.js @@ -1,3 +1,12 @@ +// Tests that we can restart a replica set completely. Also tests that the config is saved properly +// between restarts. +// +// If all data-bearing nodes in a replica set are using an ephemeral storage engine, the set will +// not be able to survive a scenario where all data-bearing nodes are down simultaneously. In such a +// scenario, none of the members will have any replica set configuration document after a restart, +// so cannot elect a primary. This test induces such a scenario, so cannot be run on ephemeral +// storage engines. +// @tags: [requires_persistence] (function() { var compare_configs = function(c1, c2) { @@ -11,9 +20,6 @@ } }; - // Make sure that we can restart a replica set completely - // Also, ensure config is saved properly between restarts. - // Create a new replica set test. Specify set name and the number of nodes you want. var replTest = new ReplSetTest( {name: 'testSet', nodes: 3} ); @@ -45,7 +51,7 @@ replTest.stop( s2Id ); replTest.waitForState(s1, replTest.DOWN); replTest.waitForState(s2, replTest.DOWN); - + replTest.stop( mId ); // Now let's restart these nodes |