blob: 8dead0a439ad2b124c9613c96ed88343685fa1cc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
[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())
}
|