From 803b66fd6d8b7aa1c4970b65375583fed6c4082e Mon Sep 17 00:00:00 2001 From: Olaoluwa Osuntokun Date: Tue, 6 Sep 2016 11:20:35 -0700 Subject: [PATCH] build: force 'go test' to build+test packages serially This commit fixes some flakiness exhibited within the tests on Travis due to the default behavior of the `go test` command to execute tests amongst packages in parallel. Since many tests use the `rpctest` package from `btcd`, many instances of `btcd` would be started at the same time, with only one being able to grab the port and fully start up. By forcing tests to be executed serially, this behavior should be patched. One downside is that builds on Travis will take longer. Therefore, this may be a temporary fix a more fundamental fix within the `rpctest` package is implemented. --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 70f89864..02172847 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,4 +10,4 @@ install: - go install -v . # Required for the integration tests. script: - export PATH=$PATH:$HOME/gopath/bin - - go test -v $(go list ./... | grep -v '/vendor/') + - go test -p 1 -v $(go list ./... | grep -v '/vendor/')