summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Costas <alexander.costas@mongodb.com>2020-01-24 17:46:47 +0000
committerevergreen <evergreen@mongodb.com>2020-01-24 17:46:47 +0000
commitaed4edcbf74f914fbcdd831937fa581aa436c5c6 (patch)
treee367441117f66d749110e476c0606decdd2c9f30
parent6ae36926ee13cf88de3aa6391e56bcfbc020a4b3 (diff)
downloadmongo-aed4edcbf74f914fbcdd831937fa581aa436c5c6.tar.gz
SERVER-45644: Reevaluate timeouts used by burn_in_test
-rw-r--r--buildscripts/burn_in_tests.py5
-rw-r--r--buildscripts/tests/test_burn_in_tests.py4
2 files changed, 6 insertions, 3 deletions
diff --git a/buildscripts/burn_in_tests.py b/buildscripts/burn_in_tests.py
index 25a86dda769..56ec45261e7 100644
--- a/buildscripts/burn_in_tests.py
+++ b/buildscripts/burn_in_tests.py
@@ -42,6 +42,7 @@ from buildscripts.ciconfig.evergreen import parse_evergreen_file, ResmokeArgs, \
from buildscripts.util.teststats import TestStats
from buildscripts.util.taskname import name_generated_task
from buildscripts.patch_builds.task_generation import resmoke_commands, TimeoutInfo, TaskList
+
# pylint: enable=wrong-import-position
structlog.configure(logger_factory=LoggerFactory())
@@ -53,6 +54,7 @@ EXTERNAL_LOGGERS = {
}
AVG_TEST_RUNTIME_ANALYSIS_DAYS = 14
+AVG_TEST_SETUP_SEC = 4 * 60
AVG_TEST_TIME_MULTIPLIER = 3
CONFIG_FILE = ".evergreen.yml"
DEFAULT_PROJECT = "mongodb-mongo-master"
@@ -491,7 +493,8 @@ def _calculate_exec_timeout(repeat_config: RepeatConfig, avg_test_runtime: float
test_execution_time_over_limit = avg_test_runtime - (repeat_tests_secs % avg_test_runtime)
test_execution_time_over_limit = max(MIN_AVG_TEST_OVERFLOW_SEC, test_execution_time_over_limit)
- return ceil(repeat_tests_secs + (test_execution_time_over_limit * AVG_TEST_TIME_MULTIPLIER))
+ return ceil(repeat_tests_secs + (test_execution_time_over_limit * AVG_TEST_TIME_MULTIPLIER) +
+ AVG_TEST_SETUP_SEC)
def _generate_timeouts(repeat_config: RepeatConfig, test: str,
diff --git a/buildscripts/tests/test_burn_in_tests.py b/buildscripts/tests/test_burn_in_tests.py
index 18d13c255fe..3d530d47d56 100644
--- a/buildscripts/tests/test_burn_in_tests.py
+++ b/buildscripts/tests/test_burn_in_tests.py
@@ -334,7 +334,7 @@ class TestCalculateExecTimeout(unittest.TestCase):
exec_timeout = under_test._calculate_exec_timeout(repeat_config, avg_test_runtime)
- self.assertEqual(1531, exec_timeout)
+ self.assertEqual(1771, exec_timeout)
def test_average_timeout_greater_than_execution_time(self):
repeat_config = under_test.RepeatConfig(repeat_tests_secs=600, repeat_tests_min=2)
@@ -356,7 +356,7 @@ class TestGenerateTimeouts(unittest.TestCase):
timeout_info = under_test._generate_timeouts(repeat_config, test_name, runtime_stats)
- self.assertEqual(timeout_info.exec_timeout, 1531)
+ self.assertEqual(timeout_info.exec_timeout, 1771)
self.assertEqual(timeout_info.timeout, 1366)
def test__generate_timeouts_no_results(self):