test(kube): fix flaky WaitForDelete timing in status wait tests

TestMethodContextOverridesGeneralContext/WaitForDelete used a 1s
timeout with a 500ms deletion delay, leaving only ~500ms for the
fake watcher to propagate the delete event. On loaded CI runners
this window is too tight and causes intermittent failures.

Increase the timeout to 5s and reduce the deletion delay to 100ms
so there is ample headroom. Apply the same deletion-delay reduction
to TestStatusWaitForDelete which shares the same pattern.

Signed-off-by: Terry Howe <terrylhowe@gmail.com>
pull/32016/head
Terry Howe 5 days ago
parent 1be395e7aa
commit 4c0d21f53f
No known key found for this signature in database

@ -317,7 +317,7 @@ func TestStatusWaitForDelete(t *testing.T) {
t.Parallel()
c := newTestClient(t)
timeout := time.Second
timeUntilPodDelete := time.Millisecond * 500
timeUntilPodDelete := time.Millisecond * 100
fakeClient := dynamicfake.NewSimpleDynamicClient(scheme.Scheme)
fakeMapper := testutil.NewFakeRESTMapper(
v1.SchemeGroupVersion.WithKind("Pod"),
@ -1680,8 +1680,8 @@ func TestMethodContextOverridesGeneralContext(t *testing.T) {
t.Run("method-specific context overrides general context for WaitForDelete", func(t *testing.T) {
t.Parallel()
c := newTestClient(t)
timeout := time.Second
timeUntilPodDelete := time.Millisecond * 500
timeout := 5 * time.Second
timeUntilPodDelete := time.Millisecond * 100
fakeClient := dynamicfake.NewSimpleDynamicClient(scheme.Scheme)
fakeMapper := testutil.NewFakeRESTMapper(
v1.SchemeGroupVersion.WithKind("Pod"),

Loading…
Cancel
Save