]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
ctdb-tests: Wait up to 30 seconds for process to be registered in ctdbd
authorMartin Schwenke <martin@meltin.net>
Tue, 12 Sep 2017 01:51:19 +0000 (11:51 +1000)
committerKarolin Seeger <kseeger@samba.org>
Wed, 13 Sep 2017 12:57:26 +0000 (14:57 +0200)
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 <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
(cherry picked from commit ff75f0836aef56476ec45a3bc8f3ca22c118e3a4)

ctdb/tests/simple/07_ctdb_process_exists.sh

index c44924b0fe6e62663f18d62a1977d460dba2204b..f24e93a47ad4c0e0d6438c1225e49e8559919b90 100755 (executable)
@@ -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"