Skip to content

Commit

Permalink
Use watch.Deleted event on the endpoints to ensure we do a valid tran…
Browse files Browse the repository at this point in the history
…sition

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 openshift#12736
  • Loading branch information
ramr committed Feb 2, 2017
1 parent 89ed457 commit 0ed96c6
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions test/integration/router_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 0ed96c6

Please sign in to comment.