From a26ee123952eeb86467e61ff2eb744c9e736a045 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wojciech=20Tyczy=C5=84ski?= Date: Tue, 19 Mar 2024 20:23:56 +0100 Subject: [PATCH] Relax WatchSemanticsTest to make it faster --- staging/src/k8s.io/apiserver/pkg/storage/testing/utils.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/staging/src/k8s.io/apiserver/pkg/storage/testing/utils.go b/staging/src/k8s.io/apiserver/pkg/storage/testing/utils.go index 5564f3c86f6..e30f086184a 100644 --- a/staging/src/k8s.io/apiserver/pkg/storage/testing/utils.go +++ b/staging/src/k8s.io/apiserver/pkg/storage/testing/utils.go @@ -197,7 +197,8 @@ func testCheckNoMoreResults(t *testing.T, w watch.Interface) { select { case e := <-w.ResultChan(): t.Errorf("Unexpected: %#v event received, expected no events", e) - case <-time.After(time.Second): + // We consciously make the timeout short here to speed up tests. + case <-time.After(100 * time.Millisecond): return } }