diff options
author | Tess Avitabile <tess.avitabile@mongodb.com> | 2018-04-17 11:24:53 -0400 |
---|---|---|
committer | Tess Avitabile <tess.avitabile@mongodb.com> | 2018-04-18 17:05:17 -0400 |
commit | 53c378f137bc4f577f6c92f71f47ede70ec93456 (patch) | |
tree | 65dee2088ea1677a9e4ccfcdefc9e45f0949dc0b /src/mongo/shell | |
parent | d9a5a306690d7cdb8831e64441a66cdd503d8064 (diff) | |
download | mongo-53c378f137bc4f577f6c92f71f47ede70ec93456.tar.gz |
SERVER-34434 Shell should ignore errors in abortTransaction() helper
Diffstat (limited to 'src/mongo/shell')
-rw-r--r-- | src/mongo/shell/session.js | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/mongo/shell/session.js b/src/mongo/shell/session.js index 17d5a52d5b8..f51942fc107 100644 --- a/src/mongo/shell/session.js +++ b/src/mongo/shell/session.js @@ -841,7 +841,16 @@ var { }; this.abortTransaction = function abortTransaction() { - assert.commandWorked(this._serverSession.abortTransaction(this)); + // Intentionally ignore command result. + this._serverSession.abortTransaction(this); + }; + + this.commitTransaction_forTesting = function commitTransaction_forTesting() { + return this._serverSession.commitTransaction(this); + }; + + this.abortTransaction_forTesting = function abortTransaction_forTesting() { + return this._serverSession.abortTransaction(this); }; }; } |