test: retry the property check a couple of times

41e4ce06fe shortened existing sleeps, which resulted in the check being
sometimes done before the property had a chance to update. Let's do what
what we do with the rest of the checks and retry it a couple of times.

Resolves: #29923
This commit is contained in:
Frantisek Sumsal
2023-11-08 09:13:45 +01:00
committed by Luca Boccassi
parent e3c5842732
commit 4e55082f74

View File

@@ -205,7 +205,14 @@ LOCAL"
}
assert_ntp() {
assert_eq "$(busctl get-property org.freedesktop.timedate1 /org/freedesktop/timedate1 org.freedesktop.timedate1 NTP)" "b $1"
local value="${1:?}"
for _ in {0..9}; do
[[ "$(busctl get-property org.freedesktop.timedate1 /org/freedesktop/timedate1 org.freedesktop.timedate1 NTP)" == "b $value" ]] && return 0
sleep .5
done
return 1
}
assert_timedated_signal() {