aboutsummaryrefslogtreecommitdiff
path: root/linters/nosleep/testdata/sleep_test.go
blob: d334d4e4d9ddbae285e1ce933f795e0e0ed2ada2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
package testdata

import (
	"testing"
	"time"
)

func TestNosleep(t *testing.T) {
	time.Sleep(time.Second) // want "use of time.Sleep in testing code"
}

func TestNosleepIgnore(t *testing.T) {
	time.Sleep(time.Second) //nosleep:bypass This test requires us to use a sleep statement here. I hate it too.
}