From bae034aaa3b6049957e18b302bc27d9b8d0a4b26 Mon Sep 17 00:00:00 2001 From: Martin Schwenke Date: Tue, 12 Sep 2017 11:51:19 +1000 Subject: [PATCH] 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) --- ctdb/tests/simple/07_ctdb_process_exists.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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" -- 2.47.2