diff options
author | Vesselina Ratcheva <vesselina.ratcheva@10gen.com> | 2020-07-15 20:48:48 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2020-07-16 00:31:40 +0000 |
commit | d520082a3f8568b9303ab7e37c111d436d1dd50b (patch) | |
tree | c7ea20c32c86d225f01ad1c47ae3970da5d9f042 /jstests/core | |
parent | 525a83552575efba3274bebb2d4f94b8554c5e16 (diff) | |
download | mongo-d520082a3f8568b9303ab7e37c111d436d1dd50b.tar.gz |
SERVER-48525 Forbid dropping config.transactions when there are prepared transactions
This reverts commit 2e53e13f576ab96188e2f27221c657ef02d15dd0.
Diffstat (limited to 'jstests/core')
-rw-r--r-- | jstests/core/txns/no_writes_to_config_transactions_with_prepared_transaction.js | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/jstests/core/txns/no_writes_to_config_transactions_with_prepared_transaction.js b/jstests/core/txns/no_writes_to_config_transactions_with_prepared_transaction.js index 067bf1482fa..4302a131c36 100644 --- a/jstests/core/txns/no_writes_to_config_transactions_with_prepared_transaction.js +++ b/jstests/core/txns/no_writes_to_config_transactions_with_prepared_transaction.js @@ -70,11 +70,17 @@ transactionEntry = config.transactions.findOne(); assert(transactionEntry); jsTestLog("Test that dropping config.transactions fails when there is a prepared transaction" + - " on the session"); + " present"); +jsTestLog("[1] collection drop in the same session"); assert.commandFailedWithCode(assert.throws(function() { sessionConfigDB.transactions.drop(); }), - 40528); + [4852500, 40528]); +jsTestLog("[2] collection drop not in a session"); +assert.commandFailedWithCode(assert.throws(function() { + config.transactions.drop(); + }), + 4852500); jsTestLog("Test that we can prepare a transaction on a different session"); const session2 = db.getMongo().startSession({causalConsistency: false}); |