module
Version:
v0.0.0-...-fb55e59
Opens a new window with list of versions in this module.
Published: Jul 10, 2018
License: MIT
Opens a new window with license information.
README
¶
golang-awaitility
Package golang_awaitility provides a simple mechanism to poll for conditions with a general timeout.
It is inspired by the great jvm lib "awaitility" (see https://github.com/awaitility/awaitility)
Example
package example
import (
"github.com/ecodia/golang-awaitility/awaitility"
"testing"
"time"
)
func TestSomething(t *testing.T) {
err := awaitility.Await(100 * time.Millisecond, 1000 * time.Millisecond, func() bool {
// do a real check here, e.g. some kind of isConnected()
return true
})
if err != nil {
t.Errorf("Unexpected error during await: %s", err)
}
}
Directories
¶
Package awaitility provides a simple mechanism to poll for conditions with a general timeout.
|
Package awaitility provides a simple mechanism to poll for conditions with a general timeout. |
Click to show internal directories.
Click to hide internal directories.