From: Martin Schwenke Date: Tue, 12 Sep 2017 01:51:19 +0000 (+1000) Subject: ctdb-tests: Wait up to 30 seconds for process to be registered in ctdbd X-Git-Tag: samba-4.6.9~76 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bae034aaa3b6049957e18b302bc27d9b8d0a4b26;p=thirdparty%2Fsamba.git ctdb-tests: Wait up to 30 seconds for process to be registered in ctdbd BUG: https://bugzilla.samba.org/show_bug.cgi?id=13012 This avoids a potential race where the client is not properly registered before "ctdb process-exists" is called. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs (cherry picked from commit ff75f0836aef56476ec45a3bc8f3ca22c118e3a4) --- diff --git a/ctdb/tests/simple/07_ctdb_process_exists.sh b/ctdb/tests/simple/07_ctdb_process_exists.sh index c44924b0fe6..f24e93a47ad 100755 --- a/ctdb/tests/simple/07_ctdb_process_exists.sh +++ b/ctdb/tests/simple/07_ctdb_process_exists.sh @@ -52,9 +52,9 @@ cleanup () ctdb_test_exit_hook_add cleanup -echo "Checking for PID $client_pid on node $test_node" +echo "Waiting until PID $client_pid is registered on node $test_node" status=0 -try_command_on_node $test_node \ +wait_until 30 try_command_on_node $test_node \ "$CTDB process-exists ${client_pid}" || status=$? echo "$out"