qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From c...@apache.org
Subject [qpid-dispatch] branch master updated: DISPATCH-1359: DISPATCH-480: Variable lengths for self test timeouts
Date Wed, 12 Jun 2019 13:37:53 GMT
This is an automated email from the ASF dual-hosted git repository.

chug pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/qpid-dispatch.git


The following commit(s) were added to refs/heads/master by this push:
     new 03e59d3   DISPATCH-1359: DISPATCH-480: Variable lengths for self test timeouts
03e59d3 is described below

commit 03e59d3131419113a1a030aa9165a94337aaa73d
Author: Chuck Rolke <chug@apache.org>
AuthorDate: Wed Jun 12 09:29:46 2019 -0400

     DISPATCH-1359: DISPATCH-480: Variable lengths for self test timeouts
    
    DISPATCH-1359 is trying to shorten the default test timeout from 1500
    to 300 seconds. It further makes a distinction between _fast_ self tests
    that would benefit from a shorter timeout and _slow_ self tests that
    should get a longer timeout.
    
    DISPATCH-480 is requesting a greater timeout for slow self tests in
    certain environments.
    
    This patch addresses both jiras. It sets the default short timeout to
    10 seconds and the default long timeout to 300 seconds. Then it lets
    a user specify the short and long self test timeout values on the
    cmake command line:
    
      cmake -DTEST_TIMEOUT_SHORT=20 -DTEST_TIMEOUT_LONG=600 ...
    
    This closes #521
---
 tests/CMakeLists.txt | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index 2fcff52..2abf79b 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -17,6 +17,15 @@
 ## under the License.
 ##
 
+# Define short and long test timeouts in seconds.
+# These make be specified on cmake command line.
+if    (NOT DEFINED TEST_TIMEOUT_SHORT)
+  set             (TEST_TIMEOUT_SHORT "10")
+endif (NOT DEFINED TEST_TIMEOUT_SHORT)
+if    (NOT DEFINED TEST_TIMEOUT_LONG)
+  set             (TEST_TIMEOUT_LONG "300")
+endif (NOT DEFINED TEST_TIMEOUT_LONG)
+
 include_directories(
   ${CMAKE_SOURCE_DIR}/src
   ${CMAKE_BINARY_DIR}/src
@@ -55,19 +64,31 @@ target_link_libraries(unit_tests_size qpid-dispatch)
 set(TEST_WRAP ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/run.py)
 
 add_test(unit_tests_size_10000 ${TEST_WRAP} unit_tests_size 10000)
+set_tests_properties(unit_tests_size_10000 PROPERTIES TIMEOUT ${TEST_TIMEOUT_SHORT})
 add_test(unit_tests_size_512   ${TEST_WRAP} unit_tests_size 512)
+set_tests_properties(unit_tests_size_512 PROPERTIES TIMEOUT   ${TEST_TIMEOUT_SHORT})
 add_test(unit_tests_size_10    ${TEST_WRAP} unit_tests_size 10)
+set_tests_properties(unit_tests_size_10 PROPERTIES TIMEOUT    ${TEST_TIMEOUT_SHORT})
 add_test(unit_tests_size_7     ${TEST_WRAP} unit_tests_size 7)
+set_tests_properties(unit_tests_size_7 PROPERTIES TIMEOUT     ${TEST_TIMEOUT_SHORT})
 add_test(unit_tests_size_5     ${TEST_WRAP} unit_tests_size 5)
+set_tests_properties(unit_tests_size_5 PROPERTIES TIMEOUT     ${TEST_TIMEOUT_SHORT})
 add_test(unit_tests_size_3     ${TEST_WRAP} unit_tests_size 3)
+set_tests_properties(unit_tests_size_3 PROPERTIES TIMEOUT     ${TEST_TIMEOUT_SHORT})
 add_test(unit_tests_size_2     ${TEST_WRAP} unit_tests_size 2)
+set_tests_properties(unit_tests_size_2 PROPERTIES TIMEOUT     ${TEST_TIMEOUT_SHORT})
 add_test(unit_tests_size_1     ${TEST_WRAP} unit_tests_size 1)
+set_tests_properties(unit_tests_size_1 PROPERTIES TIMEOUT     ${TEST_TIMEOUT_SHORT})
 add_test(unit_tests            ${TEST_WRAP} unit_tests ${CMAKE_CURRENT_SOURCE_DIR}/threads4.conf)
+set_tests_properties(unit_tests PROPERTIES TIMEOUT            ${TEST_TIMEOUT_SHORT})
 
 # Unit test python modules
 add_test(router_engine_test    ${TEST_WRAP} unit2 -v router_engine_test)
+set_tests_properties(router_engine_test PROPERTIES TIMEOUT ${TEST_TIMEOUT_SHORT})
 add_test(management_test       ${TEST_WRAP} unit2 -v management)
+set_tests_properties(management_test PROPERTIES TIMEOUT    ${TEST_TIMEOUT_SHORT})
 add_test(router_policy_test    ${TEST_WRAP} unit2 -v router_policy_test)
+set_tests_properties(router_policy_test PROPERTIES TIMEOUT ${TEST_TIMEOUT_SHORT})
 
 if(USE_LIBWEBSOCKETS)
   set(SYSTEM_TESTS_HTTP system_tests_http)
@@ -130,6 +151,7 @@ foreach(py_test_module
     )
 
   add_test(${py_test_module} ${TEST_WRAP} unit2 -v ${py_test_module})
+  set_tests_properties(${py_test_module} PROPERTIES TIMEOUT ${TEST_TIMEOUT_LONG})
   list(APPEND SYSTEM_TEST_FILES ${CMAKE_CURRENT_SOURCE_DIR}/${py_test_module}.py)
 endforeach()
 


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


Mime
View raw message