Remove 10ms timeout from TestWatch

This commit is contained in:
Kouhei Ueno 2014-08-06 01:01:50 +09:00
parent 462ce3e196
commit dea1b8c48b

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