From: Martin Schwenke Date: Sun, 10 Jun 2018 03:42:33 +0000 (+1000) Subject: ctdb-tests: Support CTDB_RUN_TIMEOUT_MONITOR=yes in simple tests X-Git-Tag: tevent-0.9.37~168 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=9f09579a5cddec2b678c8b1520d7ce7136b305ab;p=thirdparty%2Fsamba.git ctdb-tests: Support CTDB_RUN_TIMEOUT_MONITOR=yes in simple tests Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs --- diff --git a/ctdb/tests/simple/etc-ctdb/events/legacy/00.test.script b/ctdb/tests/simple/etc-ctdb/events/legacy/00.test.script index 03f44ff2c8c..c6797da28d7 100755 --- a/ctdb/tests/simple/etc-ctdb/events/legacy/00.test.script +++ b/ctdb/tests/simple/etc-ctdb/events/legacy/00.test.script @@ -3,12 +3,22 @@ . "${CTDB_BASE}/functions" +load_script_options + ctdb_check_args "$@" event="$1" shift case "$event" in +monitor) + if [ "$CTDB_RUN_TIMEOUT_MONITOR" = "yes" ] ; then + timeout=9999 + echo "Sleeping for ${timeout} seconds..." + sleep $timeout + fi + ;; + startup) ifaces=$(ctdb ifaces -X | tail -n +2 | cut -d '|' -f2) for i in $ifaces; do