From bba20af04d65a5d532e8804e3b41b52fc3e0db85 Mon Sep 17 00:00:00 2001 From: geigerj0 <112163019+geigerj0@users.noreply.github.com> Date: Wed, 24 Apr 2024 10:15:22 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=95=B5=EF=B8=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/acceptance/app/dynamic_policy_test.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/acceptance/app/dynamic_policy_test.go b/src/acceptance/app/dynamic_policy_test.go index 1a471e1e87..18f8f45be7 100644 --- a/src/acceptance/app/dynamic_policy_test.go +++ b/src/acceptance/app/dynamic_policy_test.go @@ -183,7 +183,7 @@ var _ = Describe("AutoScaler dynamic policy", func() { }) JustBeforeEach(func() { - // simulates ~100 requests per second + // simulate ongoing ~100 requests per second ticker = time.NewTicker(10 * time.Millisecond) go func(chan bool) { defer GinkgoRecover() @@ -206,6 +206,12 @@ var _ = Describe("AutoScaler dynamic policy", func() { WaitForNInstancesRunning(appGUID, 2, 5*time.Minute) }) + AfterEach(func() { + // ginkgo requires all go-routines to be finished before reporting the result. + // give the curl-command executing go-routines some time to return. + time.Sleep(10 * time.Second) + }) + }) Context("when throughput is less than scaling in threshold", func() {