diff options
Diffstat (limited to 'jstests/sharding')
-rw-r--r-- | jstests/sharding/linearizable_read_concern.js | 2 | ||||
-rw-r--r-- | jstests/sharding/max_time_ms_sharded.js | 26 | ||||
-rw-r--r-- | jstests/sharding/max_time_ms_sharded_new_commands.js | 2 | ||||
-rw-r--r-- | jstests/sharding/read_after_optime.js | 2 |
4 files changed, 16 insertions, 16 deletions
diff --git a/jstests/sharding/linearizable_read_concern.js b/jstests/sharding/linearizable_read_concern.js index 637566e1b2d..1269bc5c4a3 100644 --- a/jstests/sharding/linearizable_read_concern.js +++ b/jstests/sharding/linearizable_read_concern.js @@ -122,7 +122,7 @@ load("jstests/libs/write_concern_util.js"); readConcern: {level: "linearizable"}, maxTimeMS: 3000 }); - assert.commandFailedWithCode(result, ErrorCodes.ExceededTimeLimit); + assert.commandFailedWithCode(result, ErrorCodes.MaxTimeMSExpired); st.stop(); })(); diff --git a/jstests/sharding/max_time_ms_sharded.js b/jstests/sharding/max_time_ms_sharded.js index 8c6e25a3d1f..42179fad314 100644 --- a/jstests/sharding/max_time_ms_sharded.js +++ b/jstests/sharding/max_time_ms_sharded.js @@ -125,8 +125,8 @@ configureMaxTimeAlwaysTimeOut("alwaysOn"); assert.commandFailedWithCode( coll.runCommand("validate", {maxTimeMS: 60 * 1000}), - ErrorCodes.ExceededTimeLimit, - "expected vailidate to fail with code " + ErrorCodes.ExceededTimeLimit + + ErrorCodes.MaxTimeMSExpired, + "expected vailidate to fail with code " + ErrorCodes.MaxTimeMSExpired + " due to maxTimeAlwaysTimeOut fail point, but instead got: " + tojson(res)); // Negative test for "validate". @@ -136,11 +136,11 @@ // Positive test for "count". configureMaxTimeAlwaysTimeOut("alwaysOn"); - assert.commandFailedWithCode( - coll.runCommand("count", {maxTimeMS: 60 * 1000}), - ErrorCodes.ExceededTimeLimit, - "expected count to fail with code " + ErrorCodes.ExceededTimeLimit + - " due to maxTimeAlwaysTimeOut fail point, but instead got: " + tojson(res)); + assert.commandFailedWithCode(coll.runCommand("count", {maxTimeMS: 60 * 1000}), + ErrorCodes.MaxTimeMSExpired, + "expected count to fail with code " + ErrorCodes.MaxTimeMSExpired + + " due to maxTimeAlwaysTimeOut fail point, but instead got: " + + tojson(res)); // Negative test for "count". configureMaxTimeAlwaysTimeOut("off"); @@ -151,8 +151,8 @@ configureMaxTimeAlwaysTimeOut("alwaysOn"); assert.commandFailedWithCode( coll.runCommand("collStats", {maxTimeMS: 60 * 1000}), - ErrorCodes.ExceededTimeLimit, - "expected collStats to fail with code " + ErrorCodes.ExceededTimeLimit + + ErrorCodes.MaxTimeMSExpired, + "expected collStats to fail with code " + ErrorCodes.MaxTimeMSExpired + " due to maxTimeAlwaysTimeOut fail point, but instead got: " + tojson(res)); // Negative test for "collStats". @@ -174,8 +174,8 @@ }); assert.commandFailedWithCode( res, - ErrorCodes.ExceededTimeLimit, - "expected mapReduce to fail with code " + ErrorCodes.ExceededTimeLimit + + ErrorCodes.MaxTimeMSExpired, + "expected mapReduce to fail with code " + ErrorCodes.MaxTimeMSExpired + " due to maxTimeAlwaysTimeOut fail point, but instead got: " + tojson(res)); // Negative test for "mapReduce". @@ -196,8 +196,8 @@ configureMaxTimeAlwaysTimeOut("alwaysOn"); assert.commandFailedWithCode( coll.runCommand("aggregate", {pipeline: [], cursor: {}, maxTimeMS: 60 * 1000}), - ErrorCodes.ExceededTimeLimit, - "expected aggregate to fail with code " + ErrorCodes.ExceededTimeLimit + + ErrorCodes.MaxTimeMSExpired, + "expected aggregate to fail with code " + ErrorCodes.MaxTimeMSExpired + " due to maxTimeAlwaysTimeOut fail point, but instead got: " + tojson(res)); // Negative test for "aggregate". diff --git a/jstests/sharding/max_time_ms_sharded_new_commands.js b/jstests/sharding/max_time_ms_sharded_new_commands.js index 2084f1b711d..c8072359ce1 100644 --- a/jstests/sharding/max_time_ms_sharded_new_commands.js +++ b/jstests/sharding/max_time_ms_sharded_new_commands.js @@ -26,7 +26,7 @@ assert.commandFailedWithCode( admin.runCommand( {setFeatureCompatibilityVersion: lastStableFCV, maxTimeMS: 1000 * 60 * 60 * 24}), - ErrorCodes.ExceededTimeLimit, + ErrorCodes.MaxTimeMSExpired, "expected setFeatureCompatibilityVersion to fail due to maxTimeAlwaysTimeOut fail point"); // Negative test for "setFeatureCompatibilityVersion" diff --git a/jstests/sharding/read_after_optime.js b/jstests/sharding/read_after_optime.js index b174a288834..ce8c5201179 100644 --- a/jstests/sharding/read_after_optime.js +++ b/jstests/sharding/read_after_optime.js @@ -33,7 +33,7 @@ var pingIntervalSeconds = 10; assert.commandFailedWithCode( runFindCommand(new Timestamp(lastOp.ts.getTime() + pingIntervalSeconds * 5, 0)), - ErrorCodes.ExceededTimeLimit); + ErrorCodes.MaxTimeMSExpired); var msg = 'Command on database local timed out waiting for read concern to be satisfied.'; assert.soon(function() { |