summaryrefslogtreecommitdiff
path: root/jstests/core/txns
diff options
context:
space:
mode:
authorIvan Fefer <ivan.fefer@mongodb.com>2022-09-05 13:37:04 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2022-09-07 10:51:15 +0000
commita7cda0d9cf32b7074b4c9a2efe6e6590b4dab564 (patch)
treed7be9f0105c6a982ed0372f2cfe60712ad7d04cd /jstests/core/txns
parent7b8c49b09f2352b2573ebae2735ec2eb5b705aaf (diff)
downloadmongo-a7cda0d9cf32b7074b4c9a2efe6e6590b4dab564.tar.gz
SERVER-68871 Remove 'isJsonLogNoConn()' and 'isJsonLog()' functions because they always return true. Refactor the callers.
Diffstat (limited to 'jstests/core/txns')
-rw-r--r--jstests/core/txns/kill_op_on_txn_expiry.js15
-rw-r--r--jstests/core/txns/speculative_snapshot_includes_all_writes.js10
-rw-r--r--jstests/core/txns/timestamped_reads_wait_for_prepare_oplog_visibility.js1
3 files changed, 6 insertions, 20 deletions
diff --git a/jstests/core/txns/kill_op_on_txn_expiry.js b/jstests/core/txns/kill_op_on_txn_expiry.js
index f9a333efc83..834904cb6af 100644
--- a/jstests/core/txns/kill_op_on_txn_expiry.js
+++ b/jstests/core/txns/kill_op_on_txn_expiry.js
@@ -5,7 +5,6 @@
load("jstests/libs/fail_point_util.js");
load('jstests/libs/parallelTester.js');
-load("jstests/libs/logv2_helpers.js");
const dbName = "test";
const collName = "kill_op_on_txn_expiry";
@@ -73,15 +72,11 @@ try {
failPoint.wait();
jsTestLog("Wait for the transaction to expire");
- if (isJsonLog(db.getMongo())) {
- checkLog.contains(
- db.getMongo(),
- new RegExp(
- "Aborting transaction because it has been running for longer than 'transactionLifetimeLimitSeconds'.*\"txnNumber\":" +
- txnNumber));
- } else {
- checkLog.contains(db.getMongo(), "Aborting transaction with txnNumber " + txnNumber);
- }
+ checkLog.contains(
+ db.getMongo(),
+ new RegExp(
+ "Aborting transaction because it has been running for longer than 'transactionLifetimeLimitSeconds'.*\"txnNumber\":" +
+ txnNumber));
jsTestLog("Disabling fail point to enable insert to proceed and detect that the session " +
"has been killed");
diff --git a/jstests/core/txns/speculative_snapshot_includes_all_writes.js b/jstests/core/txns/speculative_snapshot_includes_all_writes.js
index 64b6bf9be35..e5cdda1ce0c 100644
--- a/jstests/core/txns/speculative_snapshot_includes_all_writes.js
+++ b/jstests/core/txns/speculative_snapshot_includes_all_writes.js
@@ -12,8 +12,6 @@
(function() {
"use strict";
-load("jstests/libs/logv2_helpers.js");
-
const dbName = "test";
const collName = "speculative_snapshot_includes_all_writes_1";
const collName2 = "speculative_snapshot_includes_all_writes_2";
@@ -73,13 +71,7 @@ try {
{_id: "b"}, {writeConcern: {w: "majority"}}));
});
- if (isJsonLog(db.getMongo())) {
- checkLog.containsJson(db.getMongo(), 20289);
- } else {
- checkLog.contains(
- db.getMongo(),
- "hangAfterCollectionInserts fail point enabled for " + testColl2.getFullName());
- }
+ checkLog.containsJson(db.getMongo(), 20289);
jsTest.log("Create a write following the uncommitted write.");
// Note this write must use local write concern; it cannot be majority committed until
diff --git a/jstests/core/txns/timestamped_reads_wait_for_prepare_oplog_visibility.js b/jstests/core/txns/timestamped_reads_wait_for_prepare_oplog_visibility.js
index fdba5e44e8b..43e9f00ce1d 100644
--- a/jstests/core/txns/timestamped_reads_wait_for_prepare_oplog_visibility.js
+++ b/jstests/core/txns/timestamped_reads_wait_for_prepare_oplog_visibility.js
@@ -44,7 +44,6 @@ TestData.otherDocFilter = {
* certain reads and that prepare conflicts block other types of reads.
*/
const readThreadFunc = function(readFunc, _collName, hangTimesEntered, logTimesEntered) {
- load("jstests/libs/logv2_helpers.js");
load("jstests/libs/fail_point_util.js");
// Do not start reads until we are blocked in 'prepareTransaction'.