summaryrefslogtreecommitdiff
path: root/jstests/replsets
diff options
context:
space:
mode:
authorKevin Albertson <kevin.albertson@10gen.com>2018-04-25 07:53:19 -0400
committerMax Hirschhorn <max.hirschhorn@mongodb.com>2018-04-25 07:53:19 -0400
commitda6a8e6c7842e8f17acf89bfbf7a89384d5cc49d (patch)
tree0df04e0caa9508083d3470d7af46b9a220e2dab3 /jstests/replsets
parent5e10e0f84bfc225686547b732fec0d5fb104a6f8 (diff)
downloadmongo-da6a8e6c7842e8f17acf89bfbf7a89384d5cc49d.tar.gz
SERVER-25640 check dbhashes in stopSet
(cherry picked from commit bfc6cfe5fa474a48e35c6430858ae7a26a802e7b)
Diffstat (limited to 'jstests/replsets')
-rw-r--r--jstests/replsets/apply_batch_only_goes_forward.js4
-rw-r--r--jstests/replsets/buildindexes.js4
-rw-r--r--jstests/replsets/clean_shutdown_oplog_state.js3
-rw-r--r--jstests/replsets/double_rollback_early.js3
-rw-r--r--jstests/replsets/initial_sync_drop_collection.js3
-rw-r--r--jstests/replsets/initial_sync_invalid_index_spec.js3
-rw-r--r--jstests/replsets/ismaster1.js3
-rw-r--r--jstests/replsets/libs/apply_ops_insert_write_conflict.js3
-rw-r--r--jstests/replsets/libs/tags.js3
-rw-r--r--jstests/replsets/operation_time_read_and_write_concern.js3
-rw-r--r--jstests/replsets/reconfig.js4
-rw-r--r--jstests/replsets/rollback_auth.js2
-rw-r--r--jstests/replsets/slave_delay_clean_shutdown.js3
-rw-r--r--jstests/replsets/zero_vote_arbiter.js3
14 files changed, 42 insertions, 2 deletions
diff --git a/jstests/replsets/apply_batch_only_goes_forward.js b/jstests/replsets/apply_batch_only_goes_forward.js
index 4db9c825565..7dc8f1cf5da 100644
--- a/jstests/replsets/apply_batch_only_goes_forward.js
+++ b/jstests/replsets/apply_batch_only_goes_forward.js
@@ -14,6 +14,10 @@
* restarting, so will initial sync in this scenario, invalidating the test.
* @tags: [requires_persistence]
*/
+
+// Skip db hash check because replset cannot reach consistent state.
+TestData.skipCheckDBHashes = true;
+
(function() {
"use strict";
diff --git a/jstests/replsets/buildindexes.js b/jstests/replsets/buildindexes.js
index f6a8a781014..1cd6dd1b272 100644
--- a/jstests/replsets/buildindexes.js
+++ b/jstests/replsets/buildindexes.js
@@ -1,7 +1,9 @@
// Check that buildIndexes config option is working
(function() {
-
+ // Skip db hash check because secondary will have different number of indexes due to
+ // buildIndexes=false on the secondary.
+ TestData.skipCheckDBHashes = true;
var name = "buildIndexes";
var host = getHostName();
diff --git a/jstests/replsets/clean_shutdown_oplog_state.js b/jstests/replsets/clean_shutdown_oplog_state.js
index effa8469d7b..f1e361acc5e 100644
--- a/jstests/replsets/clean_shutdown_oplog_state.js
+++ b/jstests/replsets/clean_shutdown_oplog_state.js
@@ -7,6 +7,9 @@
(function() {
"use strict";
+ // Skip db hash check because secondary restarted as standalone.
+ TestData.skipCheckDBHashes = true;
+
var rst = new ReplSetTest({
name: "name",
nodes: 2,
diff --git a/jstests/replsets/double_rollback_early.js b/jstests/replsets/double_rollback_early.js
index 11ceb4fefa2..1e8e33cbe2b 100644
--- a/jstests/replsets/double_rollback_early.js
+++ b/jstests/replsets/double_rollback_early.js
@@ -7,6 +7,9 @@
(function() {
'use strict';
+ // Skip db hash check because replset is partitioned.
+ TestData.skipCheckDBHashes = true;
+
load("jstests/libs/check_log.js");
load("jstests/replsets/rslib.js");
diff --git a/jstests/replsets/initial_sync_drop_collection.js b/jstests/replsets/initial_sync_drop_collection.js
index fc4a953b0d5..e64fe7d38a9 100644
--- a/jstests/replsets/initial_sync_drop_collection.js
+++ b/jstests/replsets/initial_sync_drop_collection.js
@@ -3,6 +3,9 @@
(function() {
"use strict";
+ // Skip db hash check because secondary cannot complete initial sync.
+ TestData.skipCheckDBHashes = true;
+
load("jstests/libs/check_log.js");
load('jstests/replsets/libs/two_phase_drops.js');
load("jstests/libs/uuid_util.js");
diff --git a/jstests/replsets/initial_sync_invalid_index_spec.js b/jstests/replsets/initial_sync_invalid_index_spec.js
index d1126477894..f8e974eaee6 100644
--- a/jstests/replsets/initial_sync_invalid_index_spec.js
+++ b/jstests/replsets/initial_sync_invalid_index_spec.js
@@ -6,6 +6,9 @@
(function() {
"use strict";
+ // Skip db hash check because of invalid index spec.
+ TestData.skipCheckDBHashes = true;
+
load("jstests/replsets/rslib.js");
const testName = "initial_sync_invalid_index_spec";
diff --git a/jstests/replsets/ismaster1.js b/jstests/replsets/ismaster1.js
index 96de229832a..cfb50a12912 100644
--- a/jstests/replsets/ismaster1.js
+++ b/jstests/replsets/ismaster1.js
@@ -3,6 +3,9 @@
* also checks that fields that should not be in the document are absent
*/
+// Skip db hash check because node 2 is slave delayed and may time out on awaitReplication.
+TestData.skipCheckDBHashes = true;
+
load("jstests/replsets/rslib.js");
// function create the error message if an assert fails
diff --git a/jstests/replsets/libs/apply_ops_insert_write_conflict.js b/jstests/replsets/libs/apply_ops_insert_write_conflict.js
index d0a47f5b6d8..4cbdbe18e88 100644
--- a/jstests/replsets/libs/apply_ops_insert_write_conflict.js
+++ b/jstests/replsets/libs/apply_ops_insert_write_conflict.js
@@ -4,6 +4,9 @@
var ApplyOpsInsertWriteConflictTest = function(options) {
'use strict';
+ // Skip db hash check because this test may throw write conflicts and collmod fails.
+ TestData.skipCheckDBHashes = true;
+
if (!(this instanceof ApplyOpsInsertWriteConflictTest)) {
return new ApplyOpsInsertWriteConflictTest(options);
}
diff --git a/jstests/replsets/libs/tags.js b/jstests/replsets/libs/tags.js
index 0b61c990c49..d1aeac41b12 100644
--- a/jstests/replsets/libs/tags.js
+++ b/jstests/replsets/libs/tags.js
@@ -6,6 +6,9 @@
var TagsTest = function(options) {
'use strict';
+ // Skip db hash check since this test leaves replset partitioned.
+ TestData.skipCheckDBHashes = true;
+
if (!(this instanceof TagsTest)) {
return new TagsTest(options);
}
diff --git a/jstests/replsets/operation_time_read_and_write_concern.js b/jstests/replsets/operation_time_read_and_write_concern.js
index 5e1591bc328..337de5ebe3a 100644
--- a/jstests/replsets/operation_time_read_and_write_concern.js
+++ b/jstests/replsets/operation_time_read_and_write_concern.js
@@ -5,6 +5,9 @@
(function() {
"use strict";
+ // Skip db hash check because replication is stopped on secondaries.
+ TestData.skipCheckDBHashes = true;
+
load("jstests/replsets/rslib.js"); // For startSetIfSupportsReadMajority.
load("jstests/libs/write_concern_util.js"); // For stopReplicationOnSecondaries,
// restartReplicationOnSecondaries
diff --git a/jstests/replsets/reconfig.js b/jstests/replsets/reconfig.js
index 312a3cb6243..7ae2f41d3c8 100644
--- a/jstests/replsets/reconfig.js
+++ b/jstests/replsets/reconfig.js
@@ -4,6 +4,10 @@
*/
(function() {
"use strict";
+
+ // Skip db hash check because secondary is left with a different config.
+ TestData.skipCheckDBHashes = true;
+
var numNodes = 5;
var replTest = new ReplSetTest({name: 'testSet', nodes: numNodes});
var nodes = replTest.startSet();
diff --git a/jstests/replsets/rollback_auth.js b/jstests/replsets/rollback_auth.js
index 073ecb486ff..b30f9833131 100644
--- a/jstests/replsets/rollback_auth.js
+++ b/jstests/replsets/rollback_auth.js
@@ -201,9 +201,9 @@
// Verify data consistency between nodes.
authutil.asCluster(replTest.nodes, 'jstests/libs/key1', function() {
- replTest.checkReplicatedDataHashes();
replTest.checkOplogs();
});
+ // DB hash check is done in stopSet.
replTest.stopSet();
}());
diff --git a/jstests/replsets/slave_delay_clean_shutdown.js b/jstests/replsets/slave_delay_clean_shutdown.js
index db08dfab228..fe5b9e62164 100644
--- a/jstests/replsets/slave_delay_clean_shutdown.js
+++ b/jstests/replsets/slave_delay_clean_shutdown.js
@@ -5,6 +5,9 @@ load('jstests/replsets/rslib.js');
(function() {
"use strict";
+ // Skip db hash check since secondary has slave delay.
+ TestData.skipCheckDBHashes = true;
+
var ns = "test.coll";
var rst = new ReplSetTest({
diff --git a/jstests/replsets/zero_vote_arbiter.js b/jstests/replsets/zero_vote_arbiter.js
index bc7552ef47b..91ef82ab8fe 100644
--- a/jstests/replsets/zero_vote_arbiter.js
+++ b/jstests/replsets/zero_vote_arbiter.js
@@ -6,6 +6,9 @@
var NewReplicaSetConfigurationIncompatible = 103;
var InvalidReplicaSetConfig = 93;
+// Skip db hash check since replsets are assigned invalid configs.
+TestData.skipCheckDBHashes = true;
+
/*
* Create replica set with 3 nodes, add new node as 0-vote arbiter.
*/