From 22ead11044140fa728185601862da196f7497f0a Mon Sep 17 00:00:00 2001 From: Jochen Ehret Date: Thu, 11 Jul 2024 17:11:33 +0200 Subject: [PATCH 1/2] [Issue 1173] In "SendAndReceive", wait 2 seconds before reading * "conn.Read(buff)" can return EOF if the backend does not send the reply fast enough --- cats_suite_helpers/cats_suite_helpers.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cats_suite_helpers/cats_suite_helpers.go b/cats_suite_helpers/cats_suite_helpers.go index dd8727d8c..6f7478bb1 100644 --- a/cats_suite_helpers/cats_suite_helpers.go +++ b/cats_suite_helpers/cats_suite_helpers.go @@ -414,6 +414,9 @@ func SendAndReceive(addr string, externalPort string) (string, error) { return "", err } + // see https://github.com/cloudfoundry/cf-acceptance-tests/issues/1173 + time.Sleep(2 * time.Second) + buff := make([]byte, 1024) _, err = conn.Read(buff) if err != nil { From 09c341d1d2e47c2eb2cc33b6906a17b0fa508575 Mon Sep 17 00:00:00 2001 From: Jochen Ehret Date: Tue, 16 Jul 2024 10:35:01 +0200 Subject: [PATCH 2/2] [Issue 1173] In "SendAndReceive", wait 100ms * shorten wait from 2s to 100ms and see if that stabilizes the test --- cats_suite_helpers/cats_suite_helpers.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cats_suite_helpers/cats_suite_helpers.go b/cats_suite_helpers/cats_suite_helpers.go index 6f7478bb1..6187a5ceb 100644 --- a/cats_suite_helpers/cats_suite_helpers.go +++ b/cats_suite_helpers/cats_suite_helpers.go @@ -415,7 +415,7 @@ func SendAndReceive(addr string, externalPort string) (string, error) { } // see https://github.com/cloudfoundry/cf-acceptance-tests/issues/1173 - time.Sleep(2 * time.Second) + time.Sleep(100 * time.Millisecond) buff := make([]byte, 1024) _, err = conn.Read(buff)