Skip to content

Commit

Permalink
tests: Increase unit test timeout
Browse files Browse the repository at this point in the history
Increase unit-test timeout to 10 seconds as 5 seconds is often
not enough in a Jenkins environment.

Allow the timeout to be configured by setting the variable
"CC_GO_TEST_TIMEOUT" to any valid value supported by
"go test -timeout X".

Fixes clearcontainers#617.

Signed-off-by: James O. D. Hunt <[email protected]>
  • Loading branch information
jodh-intel committed Sep 25, 2017
1 parent 8bf3aab commit 1bde169
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion .ci/go-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,14 @@ script_dir=$(cd `dirname $0`; pwd)
root_dir=`dirname $script_dir`

test_packages="."
go_test_flags="-v -race -timeout 5s"

# Set default test run timeout value.
#
# CC_GO_TEST_TIMEOUT can be set to any value accepted by
# "go test -timeout X"
timeout_value=${CC_GO_TEST_TIMEOUT:-10s}

go_test_flags="-v -race -timeout $timeout_value"
cov_file="profile.cov"
tmp_cov_file="profile_tmp.cov"

Expand Down

0 comments on commit 1bde169

Please sign in to comment.