summaryrefslogtreecommitdiff
path: root/jstests/replsets/rollback_transaction_table.js
diff options
context:
space:
mode:
authorJack Mulrow <jack.mulrow@mongodb.com>2017-08-16 18:07:02 -0400
committerJack Mulrow <jack.mulrow@mongodb.com>2017-08-23 12:41:47 -0400
commitc1e7921e9d69bd9a37761deb58d119a324341a54 (patch)
tree86e7fb3084d9aea2f08263f261474c1163de15cc /jstests/replsets/rollback_transaction_table.js
parentee6a79935e98b4a12bc74cb385e7d5f62633347e (diff)
downloadmongo-c1e7921e9d69bd9a37761deb58d119a324341a54.tar.gz
SERVER-30508 Fail rollback via refetch if transactions collection UUID is different on sync source
Diffstat (limited to 'jstests/replsets/rollback_transaction_table.js')
-rw-r--r--jstests/replsets/rollback_transaction_table.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/jstests/replsets/rollback_transaction_table.js b/jstests/replsets/rollback_transaction_table.js
index e18a209eedb..9e0ca77a6d4 100644
--- a/jstests/replsets/rollback_transaction_table.js
+++ b/jstests/replsets/rollback_transaction_table.js
@@ -65,6 +65,13 @@
jsTestLog("Making sure 'downstream node' is the primary node.");
assert.eq(downstream, replTest.getPrimary());
+ // Renaming or dropping the transactions collection shouldn't crash if command is not rolled
+ // back.
+ assert.commandWorked(downstream.getDB("config").transactions.renameCollection("foo"));
+ assert.commandWorked(downstream.getDB("config").foo.renameCollection("transactions"));
+ assert(downstream.getDB("config").transactions.drop());
+ assert.commandWorked(downstream.getDB("config").createCollection("transactions"));
+
jsTestLog("Running a transaction on the 'downstream node' and waiting for it to replicate.");
let firstLsid = {id: UUID()};
let firstCmd = {