Skip to content

Commit 3415592

Browse files
authored
Merge pull request #3237 from IntersectMBO/add_default_timeout
fix(clusterlib): set default timeout to 120s in run_cli
2 parents 5479fc8 + 42c9d71 commit 3415592

File tree

4 files changed

+12
-24
lines changed

4 files changed

+12
-24
lines changed

.github/run_tests.sh

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
# DESELECT_FROM_FILE: path to file with tests to deselect
2222
# CLUSTERS_COUNT: number of local testnet clusters to launch
2323
# FORBID_RESTART: if set to 1, do not restart clusters between tests
24-
# SESSION_TIMEOUT: overall timeout for the test session (e.g. 10800 for 3 hours)
24+
# SESSION_TIMEOUT: timeout for the test session (e.g. 3h for 3 hours)
2525
#
2626
# Notes:
2727
# - If PYTEST_ARGS is provided, we disable cleanup and the initial "skip all" pass.
@@ -164,44 +164,44 @@ ensure_markexpr_default() {
164164
target_tests() {
165165
export DbSyncAbortOnPanic="${DbSyncAbortOnPanic:-1}"
166166
TEST_THREADS="${TEST_THREADS:-20}"
167-
SESSION_TIMEOUT="${SESSION_TIMEOUT:-10800}"
167+
SESSION_TIMEOUT="${SESSION_TIMEOUT:-3h}"
168168

169169
ensure_dirs
170170
set_common_env
171171
compute_common_args
172172
cleanup_previous_run
173173
initial_skip_pass
174-
run_real_tests --timeout=7200 "$@"
174+
run_real_tests "$@"
175175
}
176176

177177
target_testpr() {
178178
export TESTPR=1
179179
export CLUSTERS_COUNT="${CLUSTERS_COUNT:-5}"
180180
TEST_THREADS="${TEST_THREADS:-20}"
181-
SESSION_TIMEOUT="${SESSION_TIMEOUT:-2700}"
181+
SESSION_TIMEOUT="${SESSION_TIMEOUT:-45m}"
182182
ensure_markexpr_default "smoke"
183183

184184
ensure_dirs
185185
set_common_env
186186
compute_common_args
187187
cleanup_previous_run
188188
initial_skip_pass
189-
run_real_tests --timeout=1200 "$@"
189+
run_real_tests "$@"
190190
}
191191

192192
target_testnets() {
193193
export CLUSTERS_COUNT=1
194194
export FORBID_RESTART=1
195195
TEST_THREADS="${TEST_THREADS:-15}"
196-
SESSION_TIMEOUT="${SESSION_TIMEOUT:-72000}"
196+
SESSION_TIMEOUT="${SESSION_TIMEOUT:-20h}"
197197
ensure_markexpr_default "testnets"
198198

199199
ensure_dirs
200200
set_common_env
201201
compute_common_args
202202
cleanup_previous_run
203203
initial_skip_pass
204-
run_real_tests --timeout=7200 "$@"
204+
run_real_tests "$@"
205205
}
206206

207207
# Dispatch

cardano_node_tests/utils/custom_clusterlib.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,10 @@ def cli(
9696
Returns:
9797
clusterlib.CLIOut: A data container containing command stdout and stderr.
9898
"""
99+
# Set a default timeout. This is a change of behavior compared to the base class!
100+
if timeout is None:
101+
timeout = 120
102+
99103
cli_args_strs_all = [str(arg) for arg in cli_args]
100104
if add_default_args:
101105
cli_args_strs_all.insert(0, "cardano-cli")

poetry.lock

Lines changed: 1 addition & 16 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ PyYAML = "^6.0.2"
4343
requests = "^2.32.4"
4444
pytest-subtests = "^0.14.2"
4545
cardonnay = "^0.2.8"
46-
pytest-timeout = "^2.4.0"
4746

4847
[tool.poetry.group.dev]
4948
optional = true

0 commit comments

Comments
 (0)