...

Text file src/cmd/go/testdata/script/test_timeout.txt

Documentation: cmd/go/testdata/script

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

View as plain text