diff options
author | Antonio Fuschetto <antonio.fuschetto@mongodb.com> | 2021-07-02 16:19:50 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2021-07-02 16:36:19 +0000 |
commit | 058cf0c5b2a087256486373e2d9d3715afe54baf (patch) | |
tree | fca38673c62731f639c955bad747dbebc700e124 | |
parent | 3dc03d637b4ea5d88130dc8ee3271fdf310cf92c (diff) | |
download | mongo-058cf0c5b2a087256486373e2d9d3715afe54baf.tar.gz |
SERVER-52657 index_commands_shard_targeting.js relies on too short MaxTimeMs
-rw-r--r-- | jstests/sharding/index_commands_shard_targeting.js | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/jstests/sharding/index_commands_shard_targeting.js b/jstests/sharding/index_commands_shard_targeting.js index 4d2e60019d2..47f79e8c873 100644 --- a/jstests/sharding/index_commands_shard_targeting.js +++ b/jstests/sharding/index_commands_shard_targeting.js @@ -89,14 +89,16 @@ function assertCommandBlocksIfCriticalSectionInProgress( waitForMoveChunkStep(fromShard, moveChunkStepNames.chunkDataCommitted); // Run the command with maxTimeMS. - const cmdWithMaxTimeMS = Object.assign({}, testCase.command, {maxTimeMS: 500}); + const cmdWithMaxTimeMS = Object.assign({}, testCase.command, {maxTimeMS: 750}); let cmdThread = new Thread((host, dbName, cmdWithMaxTimeMS) => { const conn = new Mongo(host); conn.getDB(dbName).runCommand(cmdWithMaxTimeMS); }, st.s.host, dbName, cmdWithMaxTimeMS); cmdThread.start(); - // Assert that the command eventually times out. + // Assert that the command reached the shard and then timed out. + // It could be possible that the following check fails on slow clusters because the request + // expired its maxTimeMS on the mongos before to reach the shard. checkLog.contains(st.shard0, new RegExp("Failed to refresh metadata for collection.*MaxTimeMSExpired")); cmdThread.join(); |