From aed4edcbf74f914fbcdd831937fa581aa436c5c6 Mon Sep 17 00:00:00 2001 From: Alexander Costas Date: Fri, 24 Jan 2020 17:46:47 +0000 Subject: SERVER-45644: Reevaluate timeouts used by burn_in_test --- buildscripts/burn_in_tests.py | 5 ++++- buildscripts/tests/test_burn_in_tests.py | 4 ++-- 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): -- cgit v1.2.1