blob: 8dead0a439ad2b124c9613c96ed88343685fa1cc [file] [log] [blame]
[short] skip
env GO111MODULE=off
cd a
# No timeout is passed via 'go test' command.
go test -v
stdout '10m0s'
# Timeout is passed via 'go test' command.
go test -v -timeout 30m
stdout '30m0s'
-- a/timeout_test.go --
package t
import (
"flag"
"fmt"
"testing"
)
func TestTimeout(t *testing.T) {
fmt.Println(flag.Lookup("test.timeout").Value.String())
}