Skip to content

Commit

Permalink
scripts/functions: introduce wait_for_jobs_to_terminate
Browse files Browse the repository at this point in the history
(cherry picked from commit f5d50c8)

status what

(cherry picked from commit d10fde7)
  • Loading branch information
alaaeddineelamri authored and pstorz committed Sep 19, 2022
1 parent ae399de commit 2e059da
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions systemtests/scripts/functions
Expand Up @@ -3,6 +3,20 @@
# A set of useful functions to be sourced in each test
#

wait_for_jobs_to_terminate ()
{
status_of_what=$1
max_wait_in_seconds=$2
count=max_wait_in_seconds
while (( --count >= 0 )); do
if "${BAREOS_BCONSOLE_BINARY}" -c "${conf}" <<< "status ${status_of_what}" | grep "No Jobs running.";
then
break
fi
sleep 1
done
}

copy_configs()
{
COMPONENTS="bareos-dir bareos-sd bareos-fd bconsole tray-monitor"
Expand Down

0 comments on commit 2e059da

Please sign in to comment.