summaryrefslogtreecommitdiff
path: root/jstests/sharding/internal_txns/libs/fixture_helpers.js
diff options
context:
space:
mode:
Diffstat (limited to 'jstests/sharding/internal_txns/libs/fixture_helpers.js')
-rw-r--r--jstests/sharding/internal_txns/libs/fixture_helpers.js23
1 files changed, 1 insertions, 22 deletions
diff --git a/jstests/sharding/internal_txns/libs/fixture_helpers.js b/jstests/sharding/internal_txns/libs/fixture_helpers.js
index 5e418726fc6..8b215b98d14 100644
--- a/jstests/sharding/internal_txns/libs/fixture_helpers.js
+++ b/jstests/sharding/internal_txns/libs/fixture_helpers.js
@@ -5,28 +5,7 @@ function runTxnRetryOnTransientError(txnFunc) {
return true;
} catch (e) {
if (e.hasOwnProperty('errorLabels') &&
- e.errorLabels.includes('TransientTransactionError') &&
- e.code != ErrorCodes.NoSuchTransaction) {
- // Don't retry on a NoSuchTransaction error since it implies the transaction was
- // aborted so we should propagate the error instead.
- jsTest.log("Failed to run transaction due to a transient error " + tojson(e));
- return false;
- } else {
- throw e;
- }
- }
- });
-}
-
-function runTxnRetryOnLockTimeoutError(txnFunc) {
- assert.soon(() => {
- try {
- txnFunc();
- return true;
- } catch (e) {
- if (e.hasOwnProperty('errorLabels') &&
- e.errorLabels.includes('TransientTransactionError') &&
- e.code == ErrorCodes.LockTimeout) {
+ e.errorLabels.includes('TransientTransactionError')) {
jsTest.log("Failed to run transaction due to a transient error " + tojson(e));
return false;
} else {