From 4bf649f14c13357e0aa73756fd1cfcb4542acce8 Mon Sep 17 00:00:00 2001 From: Andrey Smirnov Date: Tue, 14 May 2019 01:00:59 +0300 Subject: [PATCH] chore: workaround flaky tests (#651) Signed-off-by: Andrey Smirnov --- Makefile | 1 - hack/golang/test.sh | 2 +- internal/app/init/pkg/system/health/health_test.go | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 2934a7b29..6664a29bf 100644 --- a/Makefile +++ b/Makefile @@ -204,7 +204,6 @@ test: buildkitd --opt target=$@ \ $(COMMON_ARGS) @docker load < /tmp/$@.tar - @docker run -i --rm $(DOCKER_TEST_ARGS) autonomy/$@:$(TAG) /bin/test.sh --short @trap "rm -rf ./.artifacts" EXIT; mkdir -p ./.artifacts && \ docker run -i --rm $(DOCKER_TEST_ARGS) -v $(PWD)/.artifacts:/src/artifacts autonomy/$@:$(TAG) /bin/test.sh && \ cp ./.artifacts/coverage.txt coverage.txt diff --git a/hack/golang/test.sh b/hack/golang/test.sh index 771e295b7..24f0d24f1 100755 --- a/hack/golang/test.sh +++ b/hack/golang/test.sh @@ -6,7 +6,7 @@ CGO_ENABLED=1 perform_tests() { echo "Performing tests" - go test -v -covermode=atomic -coverprofile=artifacts/coverage.txt ./... + go test -v -covermode=atomic -coverprofile=artifacts/coverage.txt -p 4 ./... } perform_short_tests() { diff --git a/internal/app/init/pkg/system/health/health_test.go b/internal/app/init/pkg/system/health/health_test.go index 0d8cbdc75..497716ea5 100644 --- a/internal/app/init/pkg/system/health/health_test.go +++ b/internal/app/init/pkg/system/health/health_test.go @@ -107,7 +107,7 @@ func (suite *CheckSuite) TestCheckAbort() { select { case <-ctx.Done(): return ctx.Err() - case <-time.After(10 * time.Millisecond): + case <-time.After(25 * time.Millisecond): return nil } }