mirror of
https://github.com/weaveworks/scope.git
synced 2026-03-02 17:50:39 +00:00
Fail if want != have!
This commit is contained in:
@@ -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)
|
||||
})
|
||||
}
|
||||
|
||||
@@ -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))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user