Test suite: improve wait_until_node_has_status()
authorMartin Schwenke <martin@meltin.net>
Thu, 12 Aug 2010 03:48:33 +0000 (13:48 +1000)
committerMartin Schwenke <martin@meltin.net>
Thu, 12 Aug 2010 03:48:33 +0000 (13:48 +1000)
commita88ee78686bd5aa2b789f5959e0562315a13525d
treea87ff6a9ddd957809bd1239681c8a6c177f2f81a
parent5bb6b28ab7b45b7242d100ae8f1483d02e1d0d1d
Test suite: improve wait_until_node_has_status()

This currently does "onnode any ... wait_until ...".  If ctdbd is
being shutdown on a node then that node might be chosen anyway, if it
is asked early enough.  Then we'll loop on that node but our ctdb
client command may always fail, causing a timeout rather than the
expected behaviour.

This puts the loop on the outside of the "onnode any" so that if the
"wrong" node is chosen initially then on the next iteration the choice
can be remade.

Signed-off-by: Martin Schwenke <martin@meltin.net>
tests/scripts/ctdb_test_functions.bash