Tests: sleep test using bigger time steps

Since every mocked clock time step also waits for 1ms to give other
goroutines a chance to run, it took too much wallclock time to mock-sleep
for 47 seconds with 100ms increments.

Stepping the mocked clock with 1s increments makes the test 10x faster.
This commit is contained in:
Sybren A. Stüvel 2022-03-04 12:35:01 +01:00
parent dbb9c71df8
commit 183bb23d2a

View File

@ -76,7 +76,7 @@ func TestCommandSleep(t *testing.T) {
close(runDone) close(runDone)
}() }()
timeStepSize := 100 * time.Millisecond timeStepSize := 1 * time.Second
loop: loop:
for { for {
select { select {