Test suite: wait_until_node_has_status() now uses "onnode any".
authorMartin Schwenke <martin@meltin.net>
Fri, 11 Sep 2009 05:55:53 +0000 (15:55 +1000)
committerMartin Schwenke <martin@meltin.net>
Fri, 11 Sep 2009 05:55:53 +0000 (15:55 +1000)
commita2aaef03d4d6bbd4b42f50f732254935d4d3469c
tree99052e8dc62de6101ef91d26c40cc20d9e81650d
parent407b3117dfc1072117abf681ec98b9e252d8744c
Test suite: wait_until_node_has_status() now uses "onnode any".

Many tests currently do this sort of thing:

  onnode 0 $CTDB_TEST_WRAPPER wait_until_node_has_status 1 disconnected

In fact, they all use exactly the same "onnode 0 $CTDB_TEST_WRAPPER"
idiom.  This is both repetitious and dangerous, since node 0 might be
shutdown during a test.  Instead, we push "onnode any
$CTDB_TEST_WRAPPER" (which selects a connected node) into
wait_until_node_has_status() and just call that function directly in
tests, like this:

  wait_until_node_has_status 1 disconnected

Signed-off-by: Martin Schwenke <martin@meltin.net>
13 files changed:
tests/scripts/ctdb_test_functions.bash
tests/simple/09_ctdb_ping.sh
tests/simple/18_ctdb_freeze.sh
tests/simple/19_ctdb_thaw.sh
tests/simple/20_ctdb_getmonmode.sh
tests/simple/21_ctdb_disablemonitor.sh
tests/simple/22_ctdb_enablemonitor.sh
tests/simple/26_ctdb_config_check_error_on_unreachable_ctdb.sh
tests/simple/31_ctdb_disable.sh
tests/simple/32_ctdb_enable.sh
tests/simple/41_ctdb_stop.sh
tests/simple/42_ctdb_continue.sh
tests/simple/43_stop_recmaster_yield.sh