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

Commit

Permalink
Fix flaky cached 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 21, 2019
1 parent 33c8a7d commit 20e8abd
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 20e8abd

Please sign in to comment.