2022-08-01 15:45:05 +03:00
|
|
|
package testutil
|
|
|
|
|
|
2023-04-06 16:10:13 -05:00
|
|
|
import (
|
|
|
|
|
"time"
|
|
|
|
|
)
|
2022-08-01 15:45:05 +03:00
|
|
|
|
|
|
|
|
// Constants for timing out operations, usable for creating contexts
|
|
|
|
|
// that timeout or in require.Eventually.
|
|
|
|
|
const (
|
2023-07-18 17:25:54 +03:00
|
|
|
WaitShort = 10 * time.Second
|
|
|
|
|
WaitMedium = 15 * time.Second
|
|
|
|
|
WaitLong = 25 * time.Second
|
2022-12-06 14:40:38 +01:00
|
|
|
WaitSuperLong = 60 * time.Second
|
2022-08-01 15:45:05 +03:00
|
|
|
)
|
|
|
|
|
|
|
|
|
|
// Constants for delaying repeated operations, e.g. in
|
|
|
|
|
// require.Eventually.
|
|
|
|
|
const (
|
|
|
|
|
IntervalFast = 25 * time.Millisecond
|
|
|
|
|
IntervalMedium = 250 * time.Millisecond
|
|
|
|
|
IntervalSlow = time.Second
|
|
|
|
|
)
|