Merge pull request #790 from nyaxt/flakyetcd

Remove 10ms timeout from TestWatch
This commit is contained in:
Tim Hockin 2014-08-05 10:02:43 -07:00
commit ace4e78a29

View File

@ -20,7 +20,6 @@ import (
"fmt"
"reflect"
"testing"
"time"
"github.com/GoogleCloudPlatform/kubernetes/pkg/api"
"github.com/GoogleCloudPlatform/kubernetes/pkg/conversion"
@ -387,16 +386,12 @@ func TestWatch(t *testing.T) {
},
}
select {
case event := <-watching.ResultChan():
if e, a := watch.Added, event.Type; e != a {
t.Errorf("Expected %v, got %v", e, a)
}
if e, a := pod, event.Object; !reflect.DeepEqual(e, a) {
t.Errorf("Expected %v, got %v", e, a)
}
case <-time.After(10 * time.Millisecond):
t.Errorf("Expected 1 call but got 0")
event := <-watching.ResultChan()
if e, a := watch.Added, event.Type; e != a {
t.Errorf("Expected %v, got %v", e, a)
}
if e, a := pod, event.Object; !reflect.DeepEqual(e, a) {
t.Errorf("Expected %v, got %v", e, a)
}
// Test error case