diff options
Diffstat (limited to 'jstests/replsets')
| -rw-r--r-- | jstests/replsets/await_replication_timeout.js | 6 | ||||
| -rw-r--r-- | jstests/replsets/dbhash_at_cluster_time.js | 2 | ||||
| -rw-r--r-- | jstests/replsets/linearizable_read_concern.js | 2 | ||||
| -rw-r--r-- | jstests/replsets/read_after_optime.js | 2 | ||||
| -rw-r--r-- | jstests/replsets/read_committed_after_rollback.js | 2 | ||||
| -rw-r--r-- | jstests/replsets/read_committed_no_snapshots.js | 4 | ||||
| -rw-r--r-- | jstests/replsets/read_committed_with_catalog_changes.js | 2 | ||||
| -rw-r--r-- | jstests/replsets/stepdown_catch_up_opt.js | 2 |
8 files changed, 10 insertions, 12 deletions
diff --git a/jstests/replsets/await_replication_timeout.js b/jstests/replsets/await_replication_timeout.js index 93600d2ca81..2fb4e6e9471 100644 --- a/jstests/replsets/await_replication_timeout.js +++ b/jstests/replsets/await_replication_timeout.js @@ -32,8 +32,7 @@ // Test maxTimeMS timeout res = testDB.runCommand( {insert: collName, documents: [{a: 1}], writeConcern: {w: 3}, maxTimeMS: 1000}); - assert.commandFailedWithCode(res, ErrorCodes.ExceededTimeLimit); - assert.eq(ErrorCodes.ExceededTimeLimit, res.writeConcernError.code); + assert.commandFailedWithCode(res, ErrorCodes.MaxTimeMSExpired); // Test with wtimeout < maxTimeMS res = testDB.runCommand({ @@ -52,8 +51,7 @@ writeConcern: {w: 3, wtimeout: 10 * 1000}, maxTimeMS: 1000 }); - assert.commandFailedWithCode(res, ErrorCodes.ExceededTimeLimit); - assert.eq(ErrorCodes.ExceededTimeLimit, res.writeConcernError.code); + assert.commandFailedWithCode(res, ErrorCodes.MaxTimeMSExpired); // dropDatabase respects the 'w' field when it is stronger than the default of majority. res = testDB.runCommand({dropDatabase: 1, writeConcern: {w: 3, wtimeout: 1000}}); diff --git a/jstests/replsets/dbhash_at_cluster_time.js b/jstests/replsets/dbhash_at_cluster_time.js index d2a77899003..27f4e0f79db 100644 --- a/jstests/replsets/dbhash_at_cluster_time.js +++ b/jstests/replsets/dbhash_at_cluster_time.js @@ -98,7 +98,7 @@ // However, the "dbHash" command should block behind the transaction if "atClusterTime" // wasn't specified. res = assert.commandFailedWithCode(db.runCommand({dbHash: 1, maxTimeMS: 1000}), - ErrorCodes.ExceededTimeLimit); + ErrorCodes.MaxTimeMSExpired); otherSession.abortTransaction(); otherSession.endSession(); diff --git a/jstests/replsets/linearizable_read_concern.js b/jstests/replsets/linearizable_read_concern.js index da544cc9e55..64ccaa32bc9 100644 --- a/jstests/replsets/linearizable_read_concern.js +++ b/jstests/replsets/linearizable_read_concern.js @@ -87,7 +87,7 @@ load('jstests/libs/write_concern_util.js'); var result = primary.getDB("test").runCommand( {"find": "foo", "readConcern": {level: "linearizable"}, "maxTimeMS": 3000}); - assert.commandFailedWithCode(result, ErrorCodes.ExceededTimeLimit); + assert.commandFailedWithCode(result, ErrorCodes.MaxTimeMSExpired); jsTestLog("Testing to make sure linearizable read command does not block forever."); diff --git a/jstests/replsets/read_after_optime.js b/jstests/replsets/read_after_optime.js index 1059d5b1c62..c9369074fee 100644 --- a/jstests/replsets/read_after_optime.js +++ b/jstests/replsets/read_after_optime.js @@ -28,7 +28,7 @@ readConcern: {afterOpTime: {ts: twoKSecTS, t: term}}, maxTimeMS: 5000, }), - ErrorCodes.ExceededTimeLimit); + ErrorCodes.MaxTimeMSExpired); }; // Run the time out test 3 times with replication debug log level increased to 2 diff --git a/jstests/replsets/read_committed_after_rollback.js b/jstests/replsets/read_committed_after_rollback.js index a4e6ffdacbd..bdb83b144a8 100644 --- a/jstests/replsets/read_committed_after_rollback.js +++ b/jstests/replsets/read_committed_after_rollback.js @@ -15,7 +15,7 @@ load("jstests/replsets/rslib.js"); // For startSetIfSupportsReadMajority. coll.runCommand('find', {"readConcern": {"level": "majority"}, "maxTimeMS": 3000}); assert.commandFailedWithCode( res, - ErrorCodes.ExceededTimeLimit, + ErrorCodes.MaxTimeMSExpired, "Expected read of " + coll.getFullName() + ' on ' + coll.getMongo().host + " to block"); } diff --git a/jstests/replsets/read_committed_no_snapshots.js b/jstests/replsets/read_committed_no_snapshots.js index df7ee835fd6..02bec8e69f7 100644 --- a/jstests/replsets/read_committed_no_snapshots.js +++ b/jstests/replsets/read_committed_no_snapshots.js @@ -66,7 +66,7 @@ load("jstests/replsets/rslib.js"); // For reconfig and startSetIfSupportsReadMa assert.commandFailedWithCode( noSnapshotSecondary.getDB(name).foo.runCommand( 'find', {"readConcern": {"level": "majority"}, "maxTimeMS": 1000}), - ErrorCodes.ExceededTimeLimit); + ErrorCodes.MaxTimeMSExpired); // Reconfig to make the no-snapshot secondary the primary var config = primary.getDB("local").system.replset.findOne(); @@ -79,6 +79,6 @@ load("jstests/replsets/rslib.js"); // For reconfig and startSetIfSupportsReadMa assert.commandFailedWithCode( primary.getSiblingDB(name).foo.runCommand( 'find', {"readConcern": {"level": "majority"}, "maxTimeMS": 1000}), - ErrorCodes.ExceededTimeLimit); + ErrorCodes.MaxTimeMSExpired); replTest.stopSet(); })(); diff --git a/jstests/replsets/read_committed_with_catalog_changes.js b/jstests/replsets/read_committed_with_catalog_changes.js index 95322fd3da5..b60fda763f2 100644 --- a/jstests/replsets/read_committed_with_catalog_changes.js +++ b/jstests/replsets/read_committed_with_catalog_changes.js @@ -218,7 +218,7 @@ load("jstests/replsets/rslib.js"); // For startSetIfSupportsReadMajority. var res = coll.runCommand('find', {"readConcern": {"level": "majority"}, "maxTimeMS": 5000}); assert.commandFailedWithCode(res, - ErrorCodes.ExceededTimeLimit, + ErrorCodes.MaxTimeMSExpired, "Expected read of " + coll.getFullName() + " to block"); } diff --git a/jstests/replsets/stepdown_catch_up_opt.js b/jstests/replsets/stepdown_catch_up_opt.js index 48bd11adde1..4fd88748ae4 100644 --- a/jstests/replsets/stepdown_catch_up_opt.js +++ b/jstests/replsets/stepdown_catch_up_opt.js @@ -17,7 +17,7 @@ // Error codes we expect to see. // If the secondary is not caught up. - var noCaughtUpSecondariesCode = 50; + const noCaughtUpSecondariesCode = ErrorCodes.ExceededTimeLimit; // If the stepdown period is shorter than the secondaryCatchUpPeriodSecs argument. var stepDownPeriodTooShortCode = 2; |
