summaryrefslogtreecommitdiff
path: root/jstests/concurrency
diff options
context:
space:
mode:
Diffstat (limited to 'jstests/concurrency')
-rw-r--r--jstests/concurrency/fsm_libs/resmoke_runner.js48
-rw-r--r--jstests/concurrency/fsm_workloads/create_database.js2
-rw-r--r--jstests/concurrency/fsm_workloads/create_index_background.js2
-rw-r--r--jstests/concurrency/fsm_workloads/create_index_background_unique.js2
-rw-r--r--jstests/concurrency/fsm_workloads/create_index_background_unique_capped.js2
-rw-r--r--jstests/concurrency/fsm_workloads/create_index_background_wildcard.js2
-rw-r--r--jstests/concurrency/fsm_workloads/reindex_background.js2
-rw-r--r--jstests/concurrency/fsm_workloads/secondary_reads.js2
-rw-r--r--jstests/concurrency/fsm_workloads/secondary_reads_with_catalog_changes.js2
-rw-r--r--jstests/concurrency/fsm_workloads/snapshot_read_catalog_operations.js2
10 files changed, 40 insertions, 26 deletions
diff --git a/jstests/concurrency/fsm_libs/resmoke_runner.js b/jstests/concurrency/fsm_libs/resmoke_runner.js
index 409b588c4c6..f915c554076 100644
--- a/jstests/concurrency/fsm_libs/resmoke_runner.js
+++ b/jstests/concurrency/fsm_libs/resmoke_runner.js
@@ -202,27 +202,33 @@
sharded: {enabled: false},
};
- const topology = DiscoverTopology.findConnectedNodes(db.getMongo());
-
- if (topology.type === Topology.kReplicaSet) {
- clusterOptions.replication.enabled = true;
- clusterOptions.replication.numNodes = topology.nodes.length;
- } else if (topology.type === Topology.kShardedCluster) {
- clusterOptions.replication.enabled = TestData.usingReplicaSetShards || false;
- clusterOptions.sharded.enabled = true;
- clusterOptions.sharded.enableAutoSplit =
- TestData.hasOwnProperty('runningWithAutoSplit') ? TestData.runningWithAutoSplit : true;
- clusterOptions.sharded.enableBalancer =
- TestData.hasOwnProperty('runningWithBalancer') ? TestData.runningWithBalancer : true;
- clusterOptions.sharded.numMongos = topology.mongos.nodes.length;
- clusterOptions.sharded.numShards = Object.keys(topology.shards).length;
- clusterOptions.sharded.stepdownOptions = {};
- clusterOptions.sharded.stepdownOptions.configStepdown =
- TestData.runningWithConfigStepdowns || false;
- clusterOptions.sharded.stepdownOptions.shardStepdown =
- TestData.runningWithShardStepdowns || false;
- } else if (topology.type !== Topology.kStandalone) {
- throw new Error('Unrecognized topology format: ' + tojson(topology));
+ // The TestData.discoverTopoloy is false when we only care about connecting to either a
+ // standalone or primary node in a replica set.
+ if (TestData.discoverTopology !== false) {
+ const topology = DiscoverTopology.findConnectedNodes(db.getMongo());
+
+ if (topology.type === Topology.kReplicaSet) {
+ clusterOptions.replication.enabled = true;
+ clusterOptions.replication.numNodes = topology.nodes.length;
+ } else if (topology.type === Topology.kShardedCluster) {
+ clusterOptions.replication.enabled = TestData.usingReplicaSetShards || false;
+ clusterOptions.sharded.enabled = true;
+ clusterOptions.sharded.enableAutoSplit = TestData.hasOwnProperty('runningWithAutoSplit')
+ ? TestData.runningWithAutoSplit
+ : true;
+ clusterOptions.sharded.enableBalancer = TestData.hasOwnProperty('runningWithBalancer')
+ ? TestData.runningWithBalancer
+ : true;
+ clusterOptions.sharded.numMongos = topology.mongos.nodes.length;
+ clusterOptions.sharded.numShards = Object.keys(topology.shards).length;
+ clusterOptions.sharded.stepdownOptions = {};
+ clusterOptions.sharded.stepdownOptions.configStepdown =
+ TestData.runningWithConfigStepdowns || false;
+ clusterOptions.sharded.stepdownOptions.shardStepdown =
+ TestData.runningWithShardStepdowns || false;
+ } else if (topology.type !== Topology.kStandalone) {
+ throw new Error('Unrecognized topology format: ' + tojson(topology));
+ }
}
clusterOptions.sameDB = TestData.sameDB;
diff --git a/jstests/concurrency/fsm_workloads/create_database.js b/jstests/concurrency/fsm_workloads/create_database.js
index 49992626c64..884c5d442df 100644
--- a/jstests/concurrency/fsm_workloads/create_database.js
+++ b/jstests/concurrency/fsm_workloads/create_database.js
@@ -8,6 +8,8 @@
*
* Each thread uses its own database, though sometimes threads may try to create databases with
* names that only differ in case, expecting the appriopriate error code.
+ *
+ * @tags: [creates_background_indexes]
*/
load('jstests/concurrency/fsm_workload_helpers/server_types.js'); // for isEphemeralForTest
diff --git a/jstests/concurrency/fsm_workloads/create_index_background.js b/jstests/concurrency/fsm_workloads/create_index_background.js
index 93bd48dea78..a89b6944cf4 100644
--- a/jstests/concurrency/fsm_workloads/create_index_background.js
+++ b/jstests/concurrency/fsm_workloads/create_index_background.js
@@ -7,6 +7,8 @@
* The command to create a background index completes in the shell once the
* index has completed and the test no longer needs to execute more transitions.
* The first thread (tid = 0) will be the one that creates the background index.
+ *
+ * @tags: [creates_background_indexes]
*/
load('jstests/concurrency/fsm_workload_helpers/server_types.js'); // for isMongos
diff --git a/jstests/concurrency/fsm_workloads/create_index_background_unique.js b/jstests/concurrency/fsm_workloads/create_index_background_unique.js
index 929ce18a4e2..7ea06d386f4 100644
--- a/jstests/concurrency/fsm_workloads/create_index_background_unique.js
+++ b/jstests/concurrency/fsm_workloads/create_index_background_unique.js
@@ -4,6 +4,8 @@
* create_index_background_unique.js
*
* Creates multiple unique background indexes in parallel.
+ *
+ * @tags: [creates_background_indexes]
*/
var $config = (function() {
diff --git a/jstests/concurrency/fsm_workloads/create_index_background_unique_capped.js b/jstests/concurrency/fsm_workloads/create_index_background_unique_capped.js
index 4b95e1d5b76..c6f8feb30fa 100644
--- a/jstests/concurrency/fsm_workloads/create_index_background_unique_capped.js
+++ b/jstests/concurrency/fsm_workloads/create_index_background_unique_capped.js
@@ -5,7 +5,7 @@
*
* Creates multiple unique background indexes in parallel, on capped collections.
*
- * @tags: [requires_capped]
+ * @tags: [creates_background_indexes, requires_capped]
*/
load('jstests/concurrency/fsm_libs/extend_workload.js'); // for extendWorkload
diff --git a/jstests/concurrency/fsm_workloads/create_index_background_wildcard.js b/jstests/concurrency/fsm_workloads/create_index_background_wildcard.js
index 5ad4f86e2d8..46f37adb3ee 100644
--- a/jstests/concurrency/fsm_workloads/create_index_background_wildcard.js
+++ b/jstests/concurrency/fsm_workloads/create_index_background_wildcard.js
@@ -2,6 +2,8 @@
/**
* Executes the create_index_background.js workload, but with a wildcard index.
+ *
+ * @tags: [creates_background_indexes]
*/
load('jstests/concurrency/fsm_libs/extend_workload.js'); // For extendWorkload.
load('jstests/concurrency/fsm_workloads/create_index_background.js'); // For $config.
diff --git a/jstests/concurrency/fsm_workloads/reindex_background.js b/jstests/concurrency/fsm_workloads/reindex_background.js
index 47e2d71e192..79aad331087 100644
--- a/jstests/concurrency/fsm_workloads/reindex_background.js
+++ b/jstests/concurrency/fsm_workloads/reindex_background.js
@@ -8,7 +8,7 @@
* that because indexes are initially built in the background, reindexing is also done in the
* background.
*
- * @tags: [SERVER-32709]
+ * @tags: [SERVER-32709, creates_background_indexes]
*/
load('jstests/concurrency/fsm_libs/extend_workload.js'); // for extendWorkload
diff --git a/jstests/concurrency/fsm_workloads/secondary_reads.js b/jstests/concurrency/fsm_workloads/secondary_reads.js
index 4c541b60204..4970013b56d 100644
--- a/jstests/concurrency/fsm_workloads/secondary_reads.js
+++ b/jstests/concurrency/fsm_workloads/secondary_reads.js
@@ -16,7 +16,7 @@
* For each read, we check if there is any 'hole' in the returned batch. There
* should not be any 'hole' because oplogs are applied sequentially in batches.
*
- * @tags: [requires_replication]
+ * @tags: [requires_replication, uses_write_concern]
*/
var $config = (function() {
diff --git a/jstests/concurrency/fsm_workloads/secondary_reads_with_catalog_changes.js b/jstests/concurrency/fsm_workloads/secondary_reads_with_catalog_changes.js
index 35f0fa98f87..18218e00978 100644
--- a/jstests/concurrency/fsm_workloads/secondary_reads_with_catalog_changes.js
+++ b/jstests/concurrency/fsm_workloads/secondary_reads_with_catalog_changes.js
@@ -22,7 +22,7 @@ load('jstests/concurrency/fsm_workloads/secondary_reads.js'); // for $config
* Note that index/collection drop could interrupt the reads, so we need to retry if the read is
* interrupted.
*
- * @tags: [requires_replication]
+ * @tags: [creates_background_indexes, requires_replication, uses_write_concern]
*/
var $config = extendWorkload($config, function($config, $super) {
diff --git a/jstests/concurrency/fsm_workloads/snapshot_read_catalog_operations.js b/jstests/concurrency/fsm_workloads/snapshot_read_catalog_operations.js
index 7fa5da7e447..4c1b9ef5d9e 100644
--- a/jstests/concurrency/fsm_workloads/snapshot_read_catalog_operations.js
+++ b/jstests/concurrency/fsm_workloads/snapshot_read_catalog_operations.js
@@ -8,7 +8,7 @@
* finished. Additionally, index operations running concurrently with the snapshot read may cause
* the read to fail with a SnapshotUnavailable error.
*
- * @tags: [uses_transactions]
+ * @tags: [creates_background_indexes, uses_transactions]
*/
load('jstests/concurrency/fsm_workload_helpers/snapshot_read_utils.js');