Fix TestStressingCascadingDeletion flake

This commit is contained in:
Jordan Liggitt
2019-06-04 17:26:36 -04:00
parent 1409ff38e5
commit 6a7e7fc156
2 changed files with 45 additions and 20 deletions

View File

@@ -619,13 +619,9 @@ func (gc *GarbageCollector) attemptToOrphanWorker() bool {
// GraphHasUID returns if the GraphBuilder has a particular UID store in its
// uidToNode graph. It's useful for debugging.
// This method is used by integration tests.
func (gc *GarbageCollector) GraphHasUID(UIDs []types.UID) bool {
for _, u := range UIDs {
if _, ok := gc.dependencyGraphBuilder.uidToNode.Read(u); ok {
return true
}
}
return false
func (gc *GarbageCollector) GraphHasUID(u types.UID) bool {
_, ok := gc.dependencyGraphBuilder.uidToNode.Read(u)
return ok
}
// GetDeletableResources returns all resources from discoveryClient that the