Documentation ¶
Index ¶
- Constants
- func DoHash(t *testing.T, data Hashable) []byte
- func Eventually(condition func() bool, waitFor time.Duration, tick time.Duration) bool
- func RandomBytes(len int) []byte
- func RandomString(len int) string
- func RandomUint32() uint32
- func TryTilCountIs(t *testing.T, condition func() bool, cnt uint64, tick time.Duration, ...)
- type Hashable
Constants ¶
View Source
const ( WaitDuration = 4 * time.Second WaitShortTick = 50 * time.Millisecond WaitTick = 100 * time.Millisecond )
Variables ¶
This section is empty.
Functions ¶
func Eventually ¶
func RandomBytes ¶
func RandomString ¶ added in v0.2.0
func RandomUint32 ¶
func RandomUint32() uint32
func TryTilCountIs ¶
func TryTilCountIs(t *testing.T, condition func() bool, cnt uint64, tick time.Duration, msgAndArgs ...interface{})
TryTilCountIs - checks condition after each tick until condition returns true or count is equal to cnt in which case the test fails. Prefer this helper to require.Evetually when test timeout is small or close to tick timeout.
Types ¶
Click to show internal directories.
Click to hide internal directories.