mirror of
https://github.com/coder/coder.git
synced 2025-07-15 22:20:27 +00:00
chore: Use standardized test timeouts and delays (#3291)
This commit is contained in:
committed by
GitHub
parent
3d0febdd90
commit
4730c589fe
23
testutil/duration_windows.go
Normal file
23
testutil/duration_windows.go
Normal file
@ -0,0 +1,23 @@
|
||||
package testutil
|
||||
|
||||
import "time"
|
||||
|
||||
// Constants for timing out operations, usable for creating contexts
|
||||
// that timeout or in require.Eventually.
|
||||
//
|
||||
// Windows durations are adjusted for slow CI workers.
|
||||
const (
|
||||
WaitShort = 10 * time.Second
|
||||
WaitMedium = 20 * time.Second
|
||||
WaitLong = 30 * time.Second
|
||||
)
|
||||
|
||||
// Constants for delaying repeated operations, e.g. in
|
||||
// require.Eventually.
|
||||
//
|
||||
// Windows durations are adjusted for slow CI workers.
|
||||
const (
|
||||
IntervalFast = 50 * time.Millisecond
|
||||
IntervalMedium = 500 * time.Millisecond
|
||||
IntervalSlow = 2 * time.Second
|
||||
)
|
Reference in New Issue
Block a user