diff options
author | A. Jesse Jiryu Davis <jesse@mongodb.com> | 2018-12-20 09:40:47 -0600 |
---|---|---|
committer | A. Jesse Jiryu Davis <jesse@mongodb.com> | 2019-01-03 12:39:58 -0500 |
commit | 0507035c67a4399482cf562efbd328ec128f06c6 (patch) | |
tree | 2418a00fba3c5a47af28de20058a2a765b600ce5 /jstests/change_streams | |
parent | 3a90146b8e7a589e902a6cd0bd3520e971e722ce (diff) | |
download | mongo-0507035c67a4399482cf562efbd328ec128f06c6.tar.gz |
SERVER-36902 Abort transaction on shell exit, try 2
Diffstat (limited to 'jstests/change_streams')
-rw-r--r-- | jstests/change_streams/apply_ops.js | 12 | ||||
-rw-r--r-- | jstests/change_streams/apply_ops_resumability.js | 10 |
2 files changed, 11 insertions, 11 deletions
diff --git a/jstests/change_streams/apply_ops.js b/jstests/change_streams/apply_ops.js index ee116d3495d..5212f16e14b 100644 --- a/jstests/change_streams/apply_ops.js +++ b/jstests/change_streams/apply_ops.js @@ -72,7 +72,7 @@ ns: {db: db.getName(), coll: coll.getName()}, operationType: "insert", lsid: session.getSessionId(), - txnNumber: NumberLong(session._txnNumber), + txnNumber: session.getTxnNumber_forTesting(), }, { documentKey: {_id: 2}, @@ -80,7 +80,7 @@ ns: {db: db.getName(), coll: coll.getName()}, operationType: "insert", lsid: session.getSessionId(), - txnNumber: NumberLong(session._txnNumber), + txnNumber: session.getTxnNumber_forTesting(), }, { documentKey: {_id: 1}, @@ -88,14 +88,14 @@ operationType: "update", updateDescription: {removedFields: [], updatedFields: {a: 1}}, lsid: session.getSessionId(), - txnNumber: NumberLong(session._txnNumber), + txnNumber: session.getTxnNumber_forTesting(), }, { documentKey: {_id: kDeletedDocumentId}, ns: {db: db.getName(), coll: coll.getName()}, operationType: "delete", lsid: session.getSessionId(), - txnNumber: NumberLong(session._txnNumber), + txnNumber: session.getTxnNumber_forTesting(), }, { operationType: "drop", @@ -123,7 +123,7 @@ ns: {db: db.getName(), coll: otherCollName}, operationType: "insert", lsid: session.getSessionId(), - txnNumber: NumberLong(session._txnNumber), + txnNumber: session.getTxnNumber_forTesting(), }); // Verify that a whole-db stream returns the expected sequence of changes, including the insert @@ -141,7 +141,7 @@ ns: {db: otherDbName, coll: otherDbCollName}, operationType: "insert", lsid: session.getSessionId(), - txnNumber: NumberLong(session._txnNumber), + txnNumber: session.getTxnNumber_forTesting(), }); // Verify that a whole-cluster stream returns the expected sequence of changes, including the diff --git a/jstests/change_streams/apply_ops_resumability.js b/jstests/change_streams/apply_ops_resumability.js index a8d25d775d4..619bd7152d6 100644 --- a/jstests/change_streams/apply_ops_resumability.js +++ b/jstests/change_streams/apply_ops_resumability.js @@ -62,7 +62,7 @@ ns: {db: db.getName(), coll: coll.getName()}, operationType: "insert", lsid: session.getSessionId(), - txnNumber: NumberLong(session._txnNumber), + txnNumber: session.getTxnNumber_forTesting(), }, { documentKey: {_id: 2}, @@ -70,7 +70,7 @@ ns: {db: db.getName(), coll: coll.getName()}, operationType: "insert", lsid: session.getSessionId(), - txnNumber: NumberLong(session._txnNumber), + txnNumber: session.getTxnNumber_forTesting(), }, { documentKey: {_id: 1}, @@ -78,7 +78,7 @@ operationType: "update", updateDescription: {removedFields: [], updatedFields: {a: 1}}, lsid: session.getSessionId(), - txnNumber: NumberLong(session._txnNumber), + txnNumber: session.getTxnNumber_forTesting(), }, { documentKey: {_id: 3}, @@ -149,7 +149,7 @@ ns: {db: db.getName(), coll: otherCollName}, operationType: "insert", lsid: session.getSessionId(), - txnNumber: NumberLong(session._txnNumber), + txnNumber: session.getTxnNumber_forTesting(), }); // Verify that a whole-db stream can be resumed from the middle of the transaction, and that it @@ -169,7 +169,7 @@ ns: {db: otherDbName, coll: otherDbCollName}, operationType: "insert", lsid: session.getSessionId(), - txnNumber: NumberLong(session._txnNumber), + txnNumber: session.getTxnNumber_forTesting(), }); // Verify that a whole-cluster stream can be resumed from the middle of the transaction, and |