I am using Go 1.9.2 version and invoking the test with timeout disabled using -timeout 0
flag.
go test my_module -run TestModule -v --race -timeout 0
But the test execution is getting timed out after default timeout of 10m.
*** Test killed: ran too long (10m0s).
Its the way the testing
library is handling that flag value:
It only uses the given value if the timeout
is greater than 0
. Therefore, by setting it to 0, it just uses the default (10m
).
It's test.timeout
i.e.
go test my_module -run TestModule -v --race -test.timeout 0