Merge pull request #129921 from srivastav-abhishek/fix-etcd-test
Additional timeout to receive all watchEvents Kubernetes-commit: 1527a145b110f9907e3efde483d784fe362901f4
This commit is contained in:
commit
0198fdbe95
2
go.mod
2
go.mod
|
|
@ -51,7 +51,7 @@ require (
|
||||||
gopkg.in/evanphx/json-patch.v4 v4.12.0
|
gopkg.in/evanphx/json-patch.v4 v4.12.0
|
||||||
gopkg.in/go-jose/go-jose.v2 v2.6.3
|
gopkg.in/go-jose/go-jose.v2 v2.6.3
|
||||||
gopkg.in/natefinch/lumberjack.v2 v2.2.1
|
gopkg.in/natefinch/lumberjack.v2 v2.2.1
|
||||||
k8s.io/api v0.0.0-20250124010721-4dccc5e86b95
|
k8s.io/api v0.0.0-20250205124818-68351e3d8f2c
|
||||||
k8s.io/apimachinery v0.0.0-20250130161731-a2cb7d3ca743
|
k8s.io/apimachinery v0.0.0-20250130161731-a2cb7d3ca743
|
||||||
k8s.io/client-go v0.0.0-20250130002447-362c5e8de9fa
|
k8s.io/client-go v0.0.0-20250130002447-362c5e8de9fa
|
||||||
k8s.io/component-base v0.0.0-20250130203310-264c1fd30132
|
k8s.io/component-base v0.0.0-20250130203310-264c1fd30132
|
||||||
|
|
|
||||||
4
go.sum
4
go.sum
|
|
@ -363,8 +363,8 @@ gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
|
||||||
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||||
honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
|
honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
|
||||||
honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
|
honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
|
||||||
k8s.io/api v0.0.0-20250124010721-4dccc5e86b95 h1:HWXnRRZiNgEmww7iRWHiKp61yeYP0zGFm12YWPvQhq8=
|
k8s.io/api v0.0.0-20250205124818-68351e3d8f2c h1:G1EScEUAUdkN0CMqZmKa1Tdi+Y3RpzsgHiuwnXimChU=
|
||||||
k8s.io/api v0.0.0-20250124010721-4dccc5e86b95/go.mod h1:YGB38orWxSXzMXdSPGWLOwrcumsaTbYPKy3dnT0HbRs=
|
k8s.io/api v0.0.0-20250205124818-68351e3d8f2c/go.mod h1:ZLCbRmcWnRFuucF3pJbT54THedF3cuZ9RlLvspU+RPA=
|
||||||
k8s.io/apimachinery v0.0.0-20250130161731-a2cb7d3ca743 h1:E5AZGEsMCbCRL7z58Mhpx50+b1gYF5GrlXLCdbsmk+M=
|
k8s.io/apimachinery v0.0.0-20250130161731-a2cb7d3ca743 h1:E5AZGEsMCbCRL7z58Mhpx50+b1gYF5GrlXLCdbsmk+M=
|
||||||
k8s.io/apimachinery v0.0.0-20250130161731-a2cb7d3ca743/go.mod h1:h8DnJz4KNjkQsP8iFir+s3sSBEK3Iy43bfB2gFjSR+A=
|
k8s.io/apimachinery v0.0.0-20250130161731-a2cb7d3ca743/go.mod h1:h8DnJz4KNjkQsP8iFir+s3sSBEK3Iy43bfB2gFjSR+A=
|
||||||
k8s.io/client-go v0.0.0-20250130002447-362c5e8de9fa h1:HWmGBG30KYT4wp83FuUB6k3R1Tz8Er1ayhvIZ3r7Wyk=
|
k8s.io/client-go v0.0.0-20250130002447-362c5e8de9fa h1:HWmGBG30KYT4wp83FuUB6k3R1Tz8Er1ayhvIZ3r7Wyk=
|
||||||
|
|
|
||||||
|
|
@ -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:])
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue