Skip to content

Commit 1e36eaf

Browse files
authored
Merge pull request containerd#6200 from bobbypage/restart_integration_test
test: Add grace period for restart monitor test
2 parents fd07d74 + 9bfec39 commit 1e36eaf

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

integration/client/restart_monitor_test.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,11 @@ version = 2
174174

175175
begin := time.Now()
176176

177-
expected := begin.Add(interval).Add(epsilon)
177+
// The restart is "truly" expected after (interval + epsilon), but due to some flakiness in CI, we give it a bit extra time.
178+
// Specifically, we give an extra "grace period" of (count / 2) seconds.
179+
expected := begin.Add(interval).Add(epsilon * (count / 2))
180+
181+
// Deadline determines when check for restart should be aborted.
178182
deadline := begin.Add(interval).Add(epsilon * count)
179183
for {
180184
status, err := task.Status(ctx)

0 commit comments

Comments
 (0)