summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Gottlieb <daniel.gottlieb@mongodb.com>2022-02-14 20:40:52 -0500
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2022-02-15 02:43:18 +0000
commitf68e19f425a944e6c2f66566eb38eb0f9233dcc8 (patch)
tree53b2d4312cfaf4fa16527fb295541ef326981aaf
parent1fa6d9faa1812f78ce97bbd988fca10b10946ead (diff)
downloadmongo-f68e19f425a944e6c2f66566eb38eb0f9233dcc8.tar.gz
Revert "SERVER-60733 Test create collection after drop collection"
This reverts commit 7aa7f8f47a2c8e07fdfb5f79b9adf870b7ca6612.
-rw-r--r--jstests/concurrency/fsm_workloads/create_and_drop_collection.js69
1 files changed, 0 insertions, 69 deletions
diff --git a/jstests/concurrency/fsm_workloads/create_and_drop_collection.js b/jstests/concurrency/fsm_workloads/create_and_drop_collection.js
deleted file mode 100644
index 7ca0e2d73f0..00000000000
--- a/jstests/concurrency/fsm_workloads/create_and_drop_collection.js
+++ /dev/null
@@ -1,69 +0,0 @@
-'use strict';
-
-/**
- * create_and_drop_collection.js
- *
- * Repeatedly creates and drops a collection.
- *
- * @tags: [requires_sharding]
- */
-var $config = (function() {
- var data = {};
-
- var states = (function() {
- function init(db, collName) {
- this.docNum = 0;
- }
-
- function checkForDocument(coll, docNum) {
- let docs = coll.find({}).toArray();
- assert.eq(docs.length, 1);
- assert.eq(docs[0]._id, docNum);
- }
-
- function createShardedCollection(db, collName) {
- assertAlways.commandWorked(db.adminCommand({enableSharding: db.getName()}));
- assertAlways.commandWorked(
- db.adminCommand({shardCollection: db[collName].getFullName(), key: {_id: 1}}));
- assertAlways.commandWorked(db[collName].insertOne({_id: this.docNum}));
- checkForDocument(db[collName], this.docNum);
- }
-
- function createUnshardedCollection(db, collName) {
- assertAlways.commandWorked(db[collName].insertOne({_id: this.docNum}));
- checkForDocument(db[collName], this.docNum);
- }
-
- function dropCollection(db, collName) {
- checkForDocument(db[collName], this.docNum++);
- assertAlways(db[collName].drop());
- }
-
- function dropDatabase(db, collName) {
- checkForDocument(db[collName], this.docNum++);
- assertAlways.commandWorked(db.dropDatabase());
- }
-
- return {
- init: init,
- createShardedCollection: createShardedCollection,
- createUnshardedCollection: createUnshardedCollection,
- dropCollection: dropCollection,
- dropDatabase: dropDatabase
- };
- })();
-
- var transitions = {
- init: {createShardedCollection: 0.5, createUnshardedCollection: 0.5},
- createShardedCollection: {dropCollection: 0.5, dropDatabase: 0.5},
- createUnshardedCollection: {dropCollection: 0.5, dropDatabase: 0.5},
- dropCollection: {createShardedCollection: 0.5, createUnshardedCollection: 0.5},
- dropDatabase: {createShardedCollection: 0.5, createUnshardedCollection: 0.5}
- };
-
- // This test in in the concurrency suite because it requires shard stepdowns to properly test
- // that no documents from a newly created collection are dropped from a previous drop
- // collection. There is only one thread because only one collection is being dropped and
- // created.
- return {threadCount: 1, iterations: 50, data: data, states: states, transitions: transitions};
-})();