mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-07-05 03:26:37 +00:00
CI: Retry fetching node_start_time when it is empty
It was observed that the `node_start_time` value is sometimes empty, leading to a test failure. This commit retries fetching the value up to 3 times. Signed-off-by: Hyounggyu Choi <Hyounggyu.Choi@ibm.com>
This commit is contained in:
parent
647560539f
commit
3aff6c5bd8
@ -48,6 +48,14 @@ setup_common() {
|
||||
node=$(get_one_kata_node)
|
||||
[ -n "$node" ]
|
||||
node_start_time=$(exec_host "$node" date +\"%Y-%m-%d %H:%M:%S\")
|
||||
# If node_start_time is empty, try again 3 times with a 5 seconds sleep between each try.
|
||||
count=0
|
||||
while [ -z "$node_start_time" ] && [ $count -lt 3 ]; do
|
||||
echo "node_start_time is empty, trying again..."
|
||||
sleep 5
|
||||
node_start_time=$(exec_host "$node" date +\"%Y-%m-%d %H:%M:%S\")
|
||||
count=$((count + 1))
|
||||
done
|
||||
[ -n "$node_start_time" ]
|
||||
export node node_start_time
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user