blob: 6fbd920b3cade232b916948b5103ba48a3071918 [file] [log] [blame]
package gophercloud
import (
"testing"
th "github.com/rackspace/gophercloud/testhelper"
)
func TestWaitFor(t *testing.T) {
err := WaitFor(0, func() (bool, error) {
return true, nil
})
if err == nil {
t.Errorf("Expected error: 'Time out in WaitFor'")
}
err = WaitFor(5, func() (bool, error) {
return true, nil
})
th.CheckNoErr(t, err)
}