Skip to content

Commit 0ed96c6

Browse files
committed
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
1 parent 89ed457 commit 0ed96c6

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

test/integration/router_test.go

+1-3
Original file line numberDiff line numberDiff line change
@@ -369,9 +369,7 @@ func TestRouter(t *testing.T) {
369369

370370
//clean up
371371
routeEvent.Type = watch.Deleted
372-
endpointEvent.Type = watch.Modified
373-
endpoints := endpointEvent.Object.(*kapi.Endpoints)
374-
endpoints.Subsets = []kapi.EndpointSubset{}
372+
endpointEvent.Type = watch.Deleted
375373

376374
sendTimeout(t, fakeMasterAndPod.EndpointChannel, eventString(endpointEvent), 30*time.Second)
377375
sendTimeout(t, fakeMasterAndPod.RouteChannel, eventString(routeEvent), 30*time.Second)

0 commit comments

Comments
 (0)