mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-14 13:45:06 +00:00
Merge pull request #129921 from srivastav-abhishek/fix-etcd-test
Additional timeout to receive all watchEvents
This commit is contained in:
@@ -189,9 +189,9 @@ func testCheckResultWithIgnoreFunc(t *testing.T, w watch.Interface, expectedEven
|
|||||||
} else {
|
} else {
|
||||||
t.Fatalf("cannot receive correct event, expect no event, but get a event: %+v", event)
|
t.Fatalf("cannot receive correct event, expect no event, but get a event: %+v", event)
|
||||||
}
|
}
|
||||||
case <-time.After(100 * time.Millisecond):
|
case <-time.After(150 * time.Millisecond):
|
||||||
// wait 100ms forcibly in order to receive watchEvents including bookmark event.
|
// wait 150ms forcibly in order to receive watchEvents including bookmark event.
|
||||||
// we cannot guarantee that we will receive all bookmark events within 100ms,
|
// we cannot guarantee that we will receive all bookmark events within 150ms,
|
||||||
// but too large timeout value will lead to exceed the timeout of package test.
|
// but too large timeout value will lead to exceed the timeout of package test.
|
||||||
if checkIndex < len(expectedEvents) {
|
if checkIndex < len(expectedEvents) {
|
||||||
t.Fatalf("cannot receive enough events within specific time, rest expected events: %+v", expectedEvents[checkIndex:])
|
t.Fatalf("cannot receive enough events within specific time, rest expected events: %+v", expectedEvents[checkIndex:])
|
||||||
|
Reference in New Issue
Block a user