github.com/gagliardetto/golang-go@v0.0.0-20201020153340-53909ea70814/cmd/go/testdata/script/test_timeout.txt (about) 1 [short] skip 2 env GO111MODULE=off 3 cd a 4 5 # If no timeout is set explicitly, 'go test' should set 6 # -test.timeout to its internal deadline. 7 go test -v . -- 8 stdout '10m0s' 9 10 # An explicit -timeout argument should be propagated to -test.timeout. 11 go test -v -timeout 30m . -- 12 stdout '30m0s' 13 14 -- a/timeout_test.go -- 15 package t 16 import ( 17 "flag" 18 "fmt" 19 "testing" 20 ) 21 func TestTimeout(t *testing.T) { 22 fmt.Println(flag.Lookup("test.timeout").Value.String()) 23 }