]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
ctdb-tests: Support CTDB_RUN_TIMEOUT_MONITOR=yes in simple tests
authorMartin Schwenke <martin@meltin.net>
Sun, 10 Jun 2018 03:42:33 +0000 (13:42 +1000)
committerMartin Schwenke <martins@samba.org>
Mon, 2 Jul 2018 06:51:22 +0000 (08:51 +0200)
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
ctdb/tests/simple/etc-ctdb/events/legacy/00.test.script

index 03f44ff2c8c5b8784003dabfbd6c1ab266e52060..c6797da28d772f6e986f103f59c595d96dd996c4 100755 (executable)
@@ -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