diff options
author | Charlie Swanson <charlie.swanson@mongodb.com> | 2015-11-19 14:01:59 -0500 |
---|---|---|
committer | Charlie Swanson <charlie.swanson@mongodb.com> | 2015-11-19 14:19:12 -0500 |
commit | 047f82cdba8d515743fd451b773740276337d01f (patch) | |
tree | 1ff8a39b3455d762c4eecc15b428cea930220a2a /jstests/replsets/auth3.js | |
parent | 078ca783b7aa817a8f1a9629f495ccb414d189f3 (diff) | |
download | mongo-047f82cdba8d515743fd451b773740276337d01f.tar.gz |
SERVER-21384 Enable replica set suites for in-memory storage engines
Diffstat (limited to 'jstests/replsets/auth3.js')
-rw-r--r-- | jstests/replsets/auth3.js | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/jstests/replsets/auth3.js b/jstests/replsets/auth3.js index 1cccd8a4d4b..d940c5e3e37 100644 --- a/jstests/replsets/auth3.js +++ b/jstests/replsets/auth3.js @@ -1,3 +1,13 @@ +// Tests that the creation of a user replicates to secondaries, and survives a restart of all +// data-bearing nodes. +// +// 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 data, and upon restart will each look for a member to +// inital sync from, so no primary will be elected. This test induces such a scenario, so cannot be +// run on ephemeral storage engines. +// @tags: [requires_persistence] + (function () { "use strict"; var keyfile = "jstests/libs/key1"; @@ -18,7 +28,7 @@ master = rs.getMaster(); master.getDB("admin").auth("foo", "bar"); assert.writeOK(master.getDB("foo").bar.insert({ x: 1 })); - } + }; jsTest.log("authing"); for (var i=0; i<2; i++) { @@ -31,7 +41,7 @@ safeInsert(); authutil.asCluster(rs.nodes, keyfile, function() { rs.awaitReplication(); }); - jsTest.log("write stuff to 0&2") + jsTest.log("write stuff to 0&2"); rs.stop(1); master = rs.getMaster(); @@ -40,7 +50,7 @@ jsTest.log("last op: " + tojson(master.getDB("local").oplog.rs.find().sort({$natural:-1}).limit(1).next())); - jsTest.log("write stuff to 1&2") + jsTest.log("write stuff to 1&2"); rs.stop(0); rs.restart(1); |