From d104f9f869a7b1933c3723a4394d829912edb4e6 Mon Sep 17 00:00:00 2001 From: "Lee E. Hinman" Date: Thu, 5 Oct 2023 13:42:32 -0500 Subject: [PATCH 1/2] adjust timeouts so tests have better chance of succeeding --- .../pkg/agent/application/coordinator/coordinator_test.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/internal/pkg/agent/application/coordinator/coordinator_test.go b/internal/pkg/agent/application/coordinator/coordinator_test.go index af51ed63523..c03e168ba82 100644 --- a/internal/pkg/agent/application/coordinator/coordinator_test.go +++ b/internal/pkg/agent/application/coordinator/coordinator_test.go @@ -325,7 +325,7 @@ func TestCoordinatorShutdownTimeout(t *testing.T) { } func TestCoordinatorShutdownErrorOneResponse(t *testing.T) { - CoordinatorShutdownTimeout = time.Millisecond + CoordinatorShutdownTimeout = 10 * time.Millisecond handlerChan, _, _, config := setupAndWaitCoordinatorDone() cfgErrStr := "config watcher error" @@ -335,7 +335,6 @@ func TestCoordinatorShutdownErrorOneResponse(t *testing.T) { } func TestCoordinatorShutdownErrorAllResponses(t *testing.T) { - CoordinatorShutdownTimeout = time.Millisecond handlerChan, runtime, varWatcher, config := setupAndWaitCoordinatorDone() runtimeErrStr := "runtime error" varsErrStr := "vars error" @@ -350,7 +349,6 @@ func TestCoordinatorShutdownErrorAllResponses(t *testing.T) { } func TestCoordinatorShutdownAllResponsesNoErrors(t *testing.T) { - CoordinatorShutdownTimeout = time.Millisecond handlerChan, runtime, varWatcher, config := setupAndWaitCoordinatorDone() runtime <- nil varWatcher <- nil From ca6ffb270102c2e36378a4ca70bc60ec19ed50c0 Mon Sep 17 00:00:00 2001 From: "Lee E. Hinman" Date: Thu, 5 Oct 2023 16:10:58 -0500 Subject: [PATCH 2/2] reset CoordinatorShutdownTimeout to default value --- internal/pkg/agent/application/coordinator/coordinator_test.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/internal/pkg/agent/application/coordinator/coordinator_test.go b/internal/pkg/agent/application/coordinator/coordinator_test.go index c03e168ba82..e84b43f182c 100644 --- a/internal/pkg/agent/application/coordinator/coordinator_test.go +++ b/internal/pkg/agent/application/coordinator/coordinator_test.go @@ -335,6 +335,7 @@ func TestCoordinatorShutdownErrorOneResponse(t *testing.T) { } func TestCoordinatorShutdownErrorAllResponses(t *testing.T) { + CoordinatorShutdownTimeout = 5 * time.Second handlerChan, runtime, varWatcher, config := setupAndWaitCoordinatorDone() runtimeErrStr := "runtime error" varsErrStr := "vars error" @@ -349,6 +350,7 @@ func TestCoordinatorShutdownErrorAllResponses(t *testing.T) { } func TestCoordinatorShutdownAllResponsesNoErrors(t *testing.T) { + CoordinatorShutdownTimeout = 5 * time.Second handlerChan, runtime, varWatcher, config := setupAndWaitCoordinatorDone() runtime <- nil varWatcher <- nil