summaryrefslogtreecommitdiff
path: root/jstests
diff options
context:
space:
mode:
authorKamran Khan <kamran.khan@mongodb.com>2015-03-30 17:15:27 -0400
committerRamon Fernandez <ramon.fernandez@mongodb.com>2015-03-30 17:57:29 -0400
commit474a456b77e0f895fc8062f980a0ed62916032b2 (patch)
treea034ffbdbf1ccc0cf28c35fc27e1abb9c108a224 /jstests
parentedd870931480efdcee135a1ccf88c10ac8187149 (diff)
downloadmongo-474a456b77e0f895fc8062f980a0ed62916032b2.tar.gz
SERVER-17808 Ensure availability in initial_sync_unsupported_auth_schema.js
Previously, the test could fail if the primary transitioned to a secondary before reInitiate finished executing. Signed-off-by: Ramon Fernandez <ramon.fernandez@mongodb.com>
Diffstat (limited to 'jstests')
-rw-r--r--jstests/replsets/initial_sync_unsupported_auth_schema.js8
1 files changed, 6 insertions, 2 deletions
diff --git a/jstests/replsets/initial_sync_unsupported_auth_schema.js b/jstests/replsets/initial_sync_unsupported_auth_schema.js
index 07f31f04ba1..ee787f334c6 100644
--- a/jstests/replsets/initial_sync_unsupported_auth_schema.js
+++ b/jstests/replsets/initial_sync_unsupported_auth_schema.js
@@ -4,7 +4,9 @@
function testInitialSyncAbortsWithUnsupportedAuthSchema(schema) {
'use strict';
- var rst = new ReplSetTest({nodes: 1});
+ // Create a replica set with one data-bearing node and one arbiter to
+ // ensure availability when the added node fasserts later in the test
+ var rst = new ReplSetTest({nodes: {n0: {}, arbiter: {}}});
rst.startSet();
rst.initiate();
@@ -39,7 +41,9 @@ function testInitialSyncAbortsWithUnsupportedAuthSchema(schema) {
function testInitialSyncAbortsWithExistingUserAndNoAuthSchema() {
'use strict';
- var rst = new ReplSetTest({nodes: 1});
+ // Create a replica set with one data-bearing node and one arbiter to
+ // ensure availability when the added node fasserts later in the test
+ var rst = new ReplSetTest({nodes: {n0: {}, arbiter: {}}});
rst.startSet();
rst.initiate();