Test suite: Fix the timeouts on the skip share check tests.
authorMartin Schwenke <martin@meltin.net>
Wed, 21 Oct 2009 10:36:39 +0000 (21:36 +1100)
committerMartin Schwenke <martin@meltin.net>
Wed, 21 Oct 2009 10:36:39 +0000 (21:36 +1100)
commit25e82a8a667a54c6921ef076c63fdd738dd75d19
tree8deb8630483adeddec782cd3ab2502861466ded8
parent6ef4364b3349145b2fec23e0431cd6df6dcadd41
Test suite: Fix the timeouts on the skip share check tests.

The timeout for waiting for state changes isn't very predictable.  It
is "about" MonitorInterval seconds...  but can be longer given the
duration of eventscript runs and other things.  So, we change the
timeout to MonitorInterval + EventScriptTimeout, hoping it never takes
that long.

Move the eventscript installation/removal from the old fake-tests into
a function in the functions file.  Implement supporting functions to
create/remove/check-for various files that it handles.  Also add a
function that uses all of this that waits for the next monitor event
(but only if all other monitor events pass).

The final check in the skip share check tests uses the above and waits
for a monitor event, and then checks that the node is still healthy.

Also enhance the wait_until function to handle a command starting with
'!' (as a separate word) to make it easy to wait for a file not to
exist.

Signed-off-by: Martin Schwenke <martin@meltin.net>
tests/complex/01_ctdb_nfs_skip_share_check.sh
tests/complex/02_ctdb_samba_skip_share_check.sh
tests/scripts/ctdb_test_functions.bash
tests/simple/00_ctdb_install_eventscript.sh [deleted file]
tests/simple/99_ctdb_uninstall_eventscript.sh [deleted file]