Skip to content

Commit 89c8371

Browse files
committed
make the snapshot check more robust
1 parent 35e79bc commit 89c8371

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

cli/server_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -987,16 +987,16 @@ func TestServer(t *testing.T) {
987987
require.NoError(t, err)
988988
require.NoError(t, body.Body.Close())
989989

990-
snap := <-snapshot
991-
require.Condition(t, func() bool {
990+
require.Eventually(t, func() bool {
991+
snap := <-snapshot
992992
htmlFirstServedFound := false
993993
for _, item := range snap.TelemetryItems {
994994
if item.Key == string(telemetry.TelemetryItemKeyHTMLFirstServedAt) {
995995
htmlFirstServedFound = true
996996
}
997997
}
998998
return htmlFirstServedFound
999-
}, "no html_first_served telemetry item")
999+
}, testutil.WaitMedium, testutil.IntervalFast, "no html_first_served telemetry item")
10001000
})
10011001
t.Run("Prometheus", func(t *testing.T) {
10021002
t.Parallel()

0 commit comments

Comments
 (0)