blob: 6fbd920b3cade232b916948b5103ba48a3071918 [file] [log] [blame]
Jamie Hannaford2aaf1a62014-10-16 12:55:50 +02001package gophercloud
2
3import (
4 "testing"
5
6 th "github.com/rackspace/gophercloud/testhelper"
7)
8
9func TestWaitFor(t *testing.T) {
10 err := WaitFor(0, func() (bool, error) {
11 return true, nil
12 })
13 if err == nil {
14 t.Errorf("Expected error: 'Time out in WaitFor'")
15 }
16
17 err = WaitFor(5, func() (bool, error) {
18 return true, nil
19 })
20 th.CheckNoErr(t, err)
21}