Merge pull request #402 from weaveworks/poll

Fail if want != have!
This commit is contained in:
Tom Wilkie
2015-08-26 17:31:20 +01:00
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -192,7 +192,7 @@ func TestRegistryEvents(t *testing.T) {
runtime.Gosched()
check := func(want []docker.Container) {
test.Poll(t, 10*time.Millisecond, want, func() interface{} {
test.Poll(t, 100*time.Millisecond, want, func() interface{} {
return allContainers(registry)
})
}
+1 -1
View File
@@ -19,7 +19,7 @@ func Poll(t *testing.T, d time.Duration, want interface{}, have func() interface
time.Sleep(d / 10)
}
h := have()
if reflect.DeepEqual(want, h) {
if !reflect.DeepEqual(want, h) {
t.Fatal(Diff(want, h))
}
}