From dea1b8c48b543f202cfb270d8b7e8d81327f6fbc Mon Sep 17 00:00:00 2001 From: Kouhei Ueno Date: Wed, 6 Aug 2014 01:01:50 +0900 Subject: [PATCH] Remove 10ms timeout from TestWatch --- pkg/tools/etcd_tools_test.go | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/pkg/tools/etcd_tools_test.go b/pkg/tools/etcd_tools_test.go index 58c19bb530c..6c79873ee54 100644 --- a/pkg/tools/etcd_tools_test.go +++ b/pkg/tools/etcd_tools_test.go @@ -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