Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-pages.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor Wiedler <iwiedler@gitlab.com>2021-01-07 18:57:17 +0300
committerIgor Wiedler <iwiedler@gitlab.com>2021-01-08 14:39:25 +0300
commit4b3289eac68be99ba7edbef4d07864ffcaec95ed (patch)
tree6bede465df91d6a74efb7d82cb975e3821933ef4 /test/acceptance
parent68a4f5bec4e3863c48b533c662839f4b3383a6b7 (diff)
Add a 1ms sleep to TestProxyv2, to mitigate flaky raceproxyv2-test-sleep
Diffstat (limited to 'test/acceptance')
-rw-r--r--test/acceptance/proxyv2_test.go7
1 files changed, 6 insertions, 1 deletions
diff --git a/test/acceptance/proxyv2_test.go b/test/acceptance/proxyv2_test.go
index c407ea19..2a42f0f1 100644
--- a/test/acceptance/proxyv2_test.go
+++ b/test/acceptance/proxyv2_test.go
@@ -4,6 +4,7 @@ import (
"io/ioutil"
"net/http"
"testing"
+ "time"
"github.com/stretchr/testify/require"
)
@@ -46,7 +47,11 @@ func TestProxyv2(t *testing.T) {
require.Contains(t, string(body), tt.expectedContent, "content mismatch")
- require.Contains(t, logBuf.String(), tt.expectedLog, "log mismatch")
+ // give the process enough time to write the log message
+ require.Eventually(t, func() bool {
+ require.Contains(t, logBuf.String(), tt.expectedLog, "log mismatch")
+ return true
+ }, time.Second, time.Millisecond)
})
}
}