summaryrefslogtreecommitdiff
path: root/jstests
diff options
context:
space:
mode:
authorJudah Schvimer <judah@mongodb.com>2018-04-20 09:54:04 -0400
committerJudah Schvimer <judah@mongodb.com>2018-04-20 09:54:04 -0400
commit5aec800d301a6806d82eac3a6bc5753b8c16dc5d (patch)
tree792f82f5c6ef0f039622817ffe48199e5ef41929 /jstests
parent197390da1d7cfae131673debdbef53a29947f065 (diff)
downloadmongo-5aec800d301a6806d82eac3a6bc5753b8c16dc5d.tar.gz
SERVER-33165 Don't return from ReplSetTest.initiate until there is a stable checkpoint
Diffstat (limited to 'jstests')
-rw-r--r--jstests/noPassthrough/auth_reject_mismatching_logical_times.js4
-rw-r--r--jstests/noPassthrough/auto_retry_on_network_error.js4
-rw-r--r--jstests/noPassthrough/read_majority.js4
-rw-r--r--jstests/noPassthrough/read_majority_reads.js4
-rw-r--r--jstests/noPassthrough/timestamp_index_builds.js7
-rw-r--r--jstests/noPassthrough/wt_delayed_secondary_read_concern_majority.js4
6 files changed, 16 insertions, 11 deletions
diff --git a/jstests/noPassthrough/auth_reject_mismatching_logical_times.js b/jstests/noPassthrough/auth_reject_mismatching_logical_times.js
index 804251c63a2..0d2a368ad49 100644
--- a/jstests/noPassthrough/auth_reject_mismatching_logical_times.js
+++ b/jstests/noPassthrough/auth_reject_mismatching_logical_times.js
@@ -45,7 +45,9 @@
// Add shard with auth enabled.
const rst = new ReplSetTest({nodes: 2});
rst.startSet({keyFile: "jstests/libs/key1", shardsvr: ""});
- rst.initiate();
+
+ // TODO: Wait for stable checkpoint when SERVER-32672 is fixed.
+ rst.initiateWithAnyNodeAsPrimary(null, "replSetInitiate", {doNotWaitForStableCheckpoint: true});
assert.commandWorked(st.s.adminCommand({addShard: rst.getURL()}));
const testDB = st.s.getDB("test");
diff --git a/jstests/noPassthrough/auto_retry_on_network_error.js b/jstests/noPassthrough/auto_retry_on_network_error.js
index 64c5ec6ae1f..b9bc5d6685b 100644
--- a/jstests/noPassthrough/auto_retry_on_network_error.js
+++ b/jstests/noPassthrough/auto_retry_on_network_error.js
@@ -43,7 +43,9 @@
const rst = new ReplSetTest({nodes: 1});
rst.startSet();
- rst.initiate();
+
+ // awaitLastStableCheckpointTimestamp runs an 'appendOplogNote' command which is not retryable.
+ rst.initiateWithAnyNodeAsPrimary(null, "replSetInitiate", {doNotWaitForStableCheckpoint: true});
const dbName = "test";
const collName = "auto_retry";
diff --git a/jstests/noPassthrough/read_majority.js b/jstests/noPassthrough/read_majority.js
index 2cdf629927a..d4fbb75c367 100644
--- a/jstests/noPassthrough/read_majority.js
+++ b/jstests/noPassthrough/read_majority.js
@@ -40,7 +40,9 @@ load("jstests/libs/analyze_plan.js");
}
});
replTest.startSet();
- replTest.initiate();
+ // Cannot wait for a stable checkpoint with 'testingSnapshotBehaviorInIsolation' set.
+ replTest.initiateWithAnyNodeAsPrimary(
+ null, "replSetInitiate", {doNotWaitForStableCheckpoint: true});
const session =
replTest.getPrimary().getDB("test").getMongo().startSession({causalConsistency: false});
diff --git a/jstests/noPassthrough/read_majority_reads.js b/jstests/noPassthrough/read_majority_reads.js
index c8322a31c67..1f196856dd7 100644
--- a/jstests/noPassthrough/read_majority_reads.js
+++ b/jstests/noPassthrough/read_majority_reads.js
@@ -234,7 +234,9 @@
}
});
replTest.startSet();
- replTest.initiate();
+ // Cannot wait for a stable checkpoint with 'testingSnapshotBehaviorInIsolation' set.
+ replTest.initiateWithAnyNodeAsPrimary(
+ null, "replSetInitiate", {doNotWaitForStableCheckpoint: true});
var mongod = replTest.getPrimary();
diff --git a/jstests/noPassthrough/timestamp_index_builds.js b/jstests/noPassthrough/timestamp_index_builds.js
index 3ebda4f3691..b55b1805e00 100644
--- a/jstests/noPassthrough/timestamp_index_builds.js
+++ b/jstests/noPassthrough/timestamp_index_builds.js
@@ -41,12 +41,7 @@
let coll = getColl(rst.getPrimary());
- // TODO Can be removed with SERVER-33165.
- //
- // Create a collection and perform two majority writes. This guarantees both nodes will have a
- // stable timestamp.
- assert.commandWorked(
- coll.insert({}, {writeConcern: {w: "majority", wtimeout: rst.kDefaultTimeoutMS}}));
+ // Create a collection and wait for the stable timestamp to exceed its creation on both nodes.
assert.commandWorked(
coll.insert({}, {writeConcern: {w: "majority", wtimeout: rst.kDefaultTimeoutMS}}));
diff --git a/jstests/noPassthrough/wt_delayed_secondary_read_concern_majority.js b/jstests/noPassthrough/wt_delayed_secondary_read_concern_majority.js
index f8679f67d7f..83fe5283117 100644
--- a/jstests/noPassthrough/wt_delayed_secondary_read_concern_majority.js
+++ b/jstests/noPassthrough/wt_delayed_secondary_read_concern_majority.js
@@ -45,7 +45,9 @@
conf.members[1].slaveDelay = 24 * 60 * 60;
rst.startSet();
- rst.initiateWithAnyNodeAsPrimary(conf);
+ // We cannot wait for a stable checkpoint due to the slaveDelay.
+ rst.initiateWithAnyNodeAsPrimary(
+ conf, "replSetInitiate", {doNotWaitForStableCheckpoint: true});
var master = rst.getPrimary(); // Waits for PRIMARY state.
// Reconfigure primary with a small cache size so less data needs to be