Skip to content
This repository has been archived by the owner on Nov 1, 2022. It is now read-only.

Commit

Permalink
Fix flakey cache discovery test
Browse files Browse the repository at this point in the history
The synchronization handle needs to be called last, to make sure the invalidation
handle is called before invoking `lookupNamespaced()`
  • Loading branch information
Alfonso Acosta committed Mar 20, 2019
1 parent 33c8a7d commit b32badd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cluster/kubernetes/cached_disco_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ func TestCachedDiscovery(t *testing.T) {
},
}
makeHandler := func(d discovery.CachedDiscoveryInterface) toolscache.ResourceEventHandler {
return chainHandler{first: addHandler, next: makeInvalidatingHandler(d)}
return chainHandler{first: makeInvalidatingHandler(d), next: addHandler}
}

cachedDisco, store, _ := makeCachedDiscovery(coreClient.Discovery(), crdClient, shutdown, makeHandler)
Expand Down

0 comments on commit b32badd

Please sign in to comment.