From 783e113bbb1bfa83630222de5b74fe95530692f0 Mon Sep 17 00:00:00 2001 From: Pavi Vetriselvan Date: Mon, 24 Aug 2020 12:25:14 -0400 Subject: SERVER-50408 Change NotMaster error name to NotWritablePrimary --- .../replsets/prepared_transaction_commands_fail_on_secondaries.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'jstests/replsets/prepared_transaction_commands_fail_on_secondaries.js') 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)); -- cgit v1.2.1