Skip to content

Commit 1f79524

Browse files
test(monitoring-agents): step the fake clock by one second
With a ten-second step the wait could end anywhere between 60 and 69 fake seconds, so a deadline shortened to 55 or 59 still passed the 60s check. One second per call makes the check tight. Assisted-by: LLM Signed-off-by: Mattia Eleuteri <[email protected]>
1 parent 4fb7368 commit 1f79524

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎hack/monitoring-agents-vm-cleanup-hook.bats‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ render_hook() {
5555
# that finalizes it; otherwise the object stays, Terminating. `patch` removes it
5656
# only when the payload actually clears the finalizers. Every call goes to $KLOG.
5757
#
58-
# date advances 10s per call from $CLOCK, so the 60s wait ends after a handful
58+
# date advances 1s per call from $CLOCK, so the 60s wait ends after sixty
5959
# of polls, and records each time it returns in $KLOG; sleep only records
6060
# itself. The log thus shows how much fake time passed before each patch.
6161
# No line below is a bare column-0 `}`, so cozytest.sh's parser leaves it alone.
@@ -97,7 +97,7 @@ KEOF
9797
cat > "$1/date" <<'KEOF'
9898
#!/bin/sh
9999
c=$(cat "$CLOCK" 2>/dev/null || echo 0)
100-
echo $((c + 10)) > "$CLOCK"
100+
echo $((c + 1)) > "$CLOCK"
101101
echo "date $((1000000 + c))" >> "$KLOG"
102102
echo $((1000000 + c))
103103
KEOF

0 commit comments

Comments
 (0)