Skip to content

Commit 1527a14

Browse files
authored
Merge pull request kubernetes#129921 from srivastav-abhishek/fix-etcd-test
Additional timeout to receive all watchEvents
2 parents d2ad0cc + f6b527c commit 1527a14

File tree

1 file changed

+3
-3
lines changed
  • staging/src/k8s.io/apiserver/pkg/storage/testing

1 file changed

+3
-3
lines changed

staging/src/k8s.io/apiserver/pkg/storage/testing/utils.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -189,9 +189,9 @@ func testCheckResultWithIgnoreFunc(t *testing.T, w watch.Interface, expectedEven
189189
} else {
190190
t.Fatalf("cannot receive correct event, expect no event, but get a event: %+v", event)
191191
}
192-
case <-time.After(100 * time.Millisecond):
193-
// wait 100ms forcibly in order to receive watchEvents including bookmark event.
194-
// we cannot guarantee that we will receive all bookmark events within 100ms,
192+
case <-time.After(150 * time.Millisecond):
193+
// wait 150ms forcibly in order to receive watchEvents including bookmark event.
194+
// we cannot guarantee that we will receive all bookmark events within 150ms,
195195
// but too large timeout value will lead to exceed the timeout of package test.
196196
if checkIndex < len(expectedEvents) {
197197
t.Fatalf("cannot receive enough events within specific time, rest expected events: %+v", expectedEvents[checkIndex:])

0 commit comments

Comments
 (0)