Changeset 6c030c1 in mod_gnutls for test


Ignore:
Timestamp:
Feb 6, 2017, 12:05:25 PM (2 years ago)
Author:
Thomas Klute <thomas2.klute@…>
Branches:
debian/master, debian/stretch-backports, master, upstream
Children:
4ae5b82
Parents:
bbfcbb5
Message:

Test suite: Make timeouts for server locks and HTTPS requests configurable

If TEST_LOCK_WAIT or TEST_QUERY_TIMEOUT are provided at configure
time, their values are stored and used instead of the default.

Location:
test
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • test/Makefile.am

    rbbfcbb5 r6c030c1  
    199199# Lockfile for the proxy backend Apache process (if any)
    200200backend_lockfile = ./backend.lock
    201 # Maximum wait time in seconds for flock to aquire instance lock
    202 # files, or Apache to remove its PID file
    203 lock_wait = 30
    204201
    205202# port for the main Apache server
     
    215212# wait loop time for MSVA startup (milliseconds)
    216213TEST_MSVA_WAIT ?= 400
    217 # seconds for the HTTP request to be sent and responded to
    218 TEST_QUERY_DELAY ?= 30
    219214
    220215AM_TESTS_ENVIRONMENT = export APACHE2=@APACHE2@; \
    221216        export AP_LIBEXECDIR=@AP_LIBEXECDIR@; \
    222         export TEST_LOCK_WAIT="$(lock_wait)"; \
     217        export TEST_LOCK_WAIT="@TEST_LOCK_WAIT@"; \
    223218        export TEST_HOST="@TEST_HOST@"; \
    224219        export TEST_PORT="$(TEST_PORT)"; \
     
    226221        export TEST_MSVA_MAX_WAIT="$(TEST_MSVA_MAX_WAIT)"; \
    227222        export TEST_MSVA_WAIT="$(TEST_MSVA_WAIT)"; \
    228         export TEST_QUERY_DELAY="$(TEST_QUERY_DELAY)"; \
     223        export TEST_QUERY_TIMEOUT="@TEST_QUERY_TIMEOUT@"; \
    229224        export BACKEND_HOST="@TEST_HOST@"; \
    230225        export HTTP_CLI="@HTTP_CLI@";
  • test/README

    rbbfcbb5 r6c030c1  
    130130 * If a machine is particularly slow or under heavy load, it's
    131131   possible that these tests will fail for timing
    132    reasons. [TEST_QUERY_DELAY (seconds for the HTTP request to be sent
    133    and responded to)]
     132   reasons. [TEST_QUERY_TIMEOUT (timeout for the HTTPS request in
     133   seconds)]
    134134
    135135The first two of these issues are avoided when the tests are isolated
  • test/runtests

    rbbfcbb5 r6c030c1  
    1919
    2020BADVARS=0
    21 for v in APACHE2 TEST_HOST TEST_PORT TEST_QUERY_DELAY TEST_MSVA_WAIT \
     21for v in APACHE2 TEST_HOST TEST_PORT TEST_QUERY_TIMEOUT TEST_MSVA_WAIT \
    2222                 MSVA_PORT; do
    2323    if [ ! -v "$v" ]; then
     
    217217# the line ends in the input file.
    218218if (sed -r "s/__HOSTNAME__/${TEST_HOST}/;s/\r?$/\r/" <${t}/input && \
    219            run_with_pidfile "${sleep_pidfile}" sleep "${TEST_QUERY_DELAY}" &) | \
     219           run_with_pidfile "${sleep_pidfile}" sleep "${TEST_QUERY_TIMEOUT}" &) | \
    220220       gnutls-cli -p "${TEST_PORT}" $(cat ${t}/gnutls-cli.args) "${TEST_HOST}" \
    221221       | tee "$output" && test "${PIPESTATUS[1]}" -eq 0;
Note: See TracChangeset for help on using the changeset viewer.