Skip to content

Commit

Permalink
Let nightly runs determine the needed timeout. (#2993)
Browse files Browse the repository at this point in the history
This is a fix for the restart recovery nightly run.
It takes ~6200s for it to pass. Setting the timeout
in the CMakelist as a property of the test disables the
timeout specified when running the test.
  • Loading branch information
HristoStaykov authored Apr 12, 2023
1 parent 66b249a commit 279c3f4
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions tests/apollo/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ endif()
# apollo_test(NAME skvbc_preexecution_with_result_auth_tests SUITE test_skvbc_preexecution VARS PRE_EXEC_RESULT_AUTH_ENABLED=True)

function(apollo_test)
set(options V4 SUDO)
set(options V4 SUDO NIGHTLY)
set(oneValueArgs NAME SUITE)
set(multiValueArgs VARS)
cmake_parse_arguments(APOLLO_TEST "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
Expand All @@ -90,7 +90,9 @@ function(apollo_test)
COMMAND ${DO_SUDO} sh -c
"env ${APOLLO_ENV} ${ADDITIONAL_ENV_VARS} BLOCK_CHAIN_VERSION=${BLOCKCHAIN_VERSION} TEST_NAME=${APOLLO_TEST_NAME} python3 -m unittest ${APOLLO_TEST_SUITE} ${TEST_OUTPUT}"
)
set_tests_properties(${APOLLO_TEST_NAME} PROPERTIES TIMEOUT ${APOLLO_TEST_TIMEOUT})
if(NOT APOLLO_TEST_NIGHTLY)
set_tests_properties(${APOLLO_TEST_NAME} PROPERTIES TIMEOUT ${APOLLO_TEST_TIMEOUT})
endif()
endfunction()

apollo_test(NAME skvbc_basic_tests SUITE test_skvbc)
Expand Down Expand Up @@ -145,5 +147,5 @@ apollo_test(NAME skvbc_reply_tests SUITE test_skvbc_reply)
apollo_test(NAME skvbc_diagnostics_tests SUITE test_skvbc_diagnostics)
apollo_test(NAME osexample_demo_tests SUITE test_osexample_demo)
if(ENABLE_RESTART_RECOVERY_TESTS)
apollo_test(NAME skvbc_restart_recovery_tests SUITE test_skvbc_restart_recovery)
apollo_test(NAME skvbc_restart_recovery_tests SUITE test_skvbc_restart_recovery NIGHTLY)
endif()

0 comments on commit 279c3f4

Please sign in to comment.