e2e test for addon update

This commit is contained in:
Marek Biskup
2015-06-15 16:31:17 +02:00
parent e1a03ed737
commit dcc4034d57
6 changed files with 449 additions and 4 deletions

View File

@@ -45,6 +45,8 @@ type ConditionFunc func() (done bool, err error)
// may be missed if the condition takes too long or the time window is too short.
// If you pass maxTimes = 0, Poll will loop until condition returns true or an
// error.
// Poll always waits the interval before the first check of the condition.
// TODO: create a separate PollImmediate function that does not wait.
func Poll(interval, timeout time.Duration, condition ConditionFunc) error {
return WaitFor(poller(interval, timeout), condition)
}