diff options
author | Pavi Vetriselvan <pavithra.vetriselvan@mongodb.com> | 2020-08-24 12:25:14 -0400 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2020-09-03 13:19:48 +0000 |
commit | 783e113bbb1bfa83630222de5b74fe95530692f0 (patch) | |
tree | 1938acb2542c93805331e166f2b638ea25b42c03 /jstests/replsets/prepared_transaction_commands_fail_on_secondaries.js | |
parent | e9b6548c82815c7fb900ee7c00e497660a7d610c (diff) | |
download | mongo-783e113bbb1bfa83630222de5b74fe95530692f0.tar.gz |
SERVER-50408 Change NotMaster error name to NotWritablePrimary
Diffstat (limited to 'jstests/replsets/prepared_transaction_commands_fail_on_secondaries.js')
-rw-r--r-- | jstests/replsets/prepared_transaction_commands_fail_on_secondaries.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/jstests/replsets/prepared_transaction_commands_fail_on_secondaries.js b/jstests/replsets/prepared_transaction_commands_fail_on_secondaries.js index 101c12252a0..a1e4561edd7 100644 --- a/jstests/replsets/prepared_transaction_commands_fail_on_secondaries.js +++ b/jstests/replsets/prepared_transaction_commands_fail_on_secondaries.js @@ -46,7 +46,7 @@ jsTestLog("Test that prepare fails on a secondary"); const txnNumber = NumberLong(priSession.getTxnNumber_forTesting()); assert.commandFailedWithCode(secSession.getDatabase('admin').adminCommand( {prepareTransaction: 1, txnNumber: txnNumber, autocommit: false}), - ErrorCodes.NotMaster); + ErrorCodes.NotWritablePrimary); const prepareTimestamp = PrepareHelpers.prepareTransaction(priSession); rst.awaitReplication(); @@ -60,12 +60,12 @@ assert.commandFailedWithCode(secSession.getDatabase('admin').adminCommand({ txnNumber: txnNumber, autocommit: false }), - ErrorCodes.NotMaster); + ErrorCodes.NotWritablePrimary); jsTestLog("Test that prepared abort fails on a secondary"); assert.commandFailedWithCode(secSession.getDatabase('admin').adminCommand( {abortTransaction: 1, txnNumber: txnNumber, autocommit: false}), - ErrorCodes.NotMaster); + ErrorCodes.NotWritablePrimary); jsTestLog("Test that we can still commit the transaction"); assert.commandWorked(PrepareHelpers.commitTransaction(priSession, commitTimestamp)); |