blob: 0db183f8f04f33aae08a9c4573f5472e099adef7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
# Tests issue 19394
[short] skip
! go test -cpuprofile cpu.pprof -memprofile mem.pprof -timeout 1ms
stdout '^panic: test timed out'
grep . cpu.pprof
grep . mem.pprof
-- go.mod --
module profiling
go 1.16
-- timeout_test.go --
package timeouttest_test
import (
"testing"
"time"
)
func TestSleep(t *testing.T) {
for {
time.Sleep(1 * time.Second)
}
}
|