diff options
author | Max Hirschhorn <max.hirschhorn@mongodb.com> | 2020-05-28 22:39:26 -0400 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2020-05-29 02:51:37 +0000 |
commit | 8f1df3e07ad034da2926d73130e0250c40e8e8ef (patch) | |
tree | 6d83ebc66fdbadd1ad6d46dac98013a165cb03d0 /jstests | |
parent | d84de21543f3eb858c2f2043f8bce4b251611065 (diff) | |
download | mongo-8f1df3e07ad034da2926d73130e0250c40e8e8ef.tar.gz |
SERVER-48168 Skip mongos_get_shard_version.js during stepdown suite.
This has only been found to be necessary on the code coverage build
variant due to the splitChunk command taking significantly longer than
the 8-second interval for the continuous stepdown thread.
(cherry picked from commit 4dcdc501520558d602897aed9aa61781265328d7)
Diffstat (limited to 'jstests')
-rw-r--r-- | jstests/sharding/mongos_get_shard_version.js | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/jstests/sharding/mongos_get_shard_version.js b/jstests/sharding/mongos_get_shard_version.js index 3d7518822a1..0854d3baaec 100644 --- a/jstests/sharding/mongos_get_shard_version.js +++ b/jstests/sharding/mongos_get_shard_version.js @@ -4,6 +4,18 @@ (function() { 'use strict'; +// If the server has been compiled with the code coverage flag, then the splitChunk command can take +// significantly longer than the 8-second interval for the continuous stepdown thread. This causes +// the test to fail because retrying the interrupted splitChunk command won't ever succeed. To check +// whether the server has been compiled with the code coverage flag, we assume the compiler flags +// used to build the mongo shell are the same as the ones used to build the server. +const isCodeCoverageEnabled = buildInfo().buildEnvironment.ccflags.includes('-ftest-coverage'); +const isStepdownSuite = typeof ContinuousStepdown !== 'undefined'; +if (isStepdownSuite && isCodeCoverageEnabled) { + print('Skipping test during stepdown suite because splitChunk command would take too long'); + return; +} + const st = new ShardingTest({shards: 2, mongos: 1}); const dbName = "test"; const collName = "foo"; |