From 0ed96c6b4d6f049c14ababf821582dd09728793d Mon Sep 17 00:00:00 2001 From: ramr Date: Thu, 2 Feb 2017 14:33:10 -0800 Subject: [PATCH] Use watch.Deleted event on the endpoints to ensure we do a valid transition Deleted -> Added instead of Modified -> Added. Otherwise the event queue code panics and kills the cache reflector goroutine which causes events to never be delivered to the test router process. fixes #12736 --- test/integration/router_test.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/test/integration/router_test.go b/test/integration/router_test.go index 50a7cb90ed10..4c89c3ebdde1 100644 --- a/test/integration/router_test.go +++ b/test/integration/router_test.go @@ -369,9 +369,7 @@ func TestRouter(t *testing.T) { //clean up routeEvent.Type = watch.Deleted - endpointEvent.Type = watch.Modified - endpoints := endpointEvent.Object.(*kapi.Endpoints) - endpoints.Subsets = []kapi.EndpointSubset{} + endpointEvent.Type = watch.Deleted sendTimeout(t, fakeMasterAndPod.EndpointChannel, eventString(endpointEvent), 30*time.Second) sendTimeout(t, fakeMasterAndPod.RouteChannel, eventString(routeEvent), 30*time.Second)