mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-04 23:17:50 +00:00
refactor garbagecollection controllers to make forget impossible to forget
This commit is contained in:
@@ -460,7 +460,7 @@ func TestDependentsRace(t *testing.T) {
|
||||
defer wg.Done()
|
||||
for i := 0; i < updates; i++ {
|
||||
gc.attemptToOrphan.Add(owner)
|
||||
gc.attemptToOrphanWorker()
|
||||
gc.processAttemptToOrphanWorker()
|
||||
}
|
||||
}()
|
||||
wg.Wait()
|
||||
@@ -2445,7 +2445,7 @@ func processAttemptToDelete(count int) step {
|
||||
if count <= 0 {
|
||||
// process all
|
||||
for ctx.gc.dependencyGraphBuilder.attemptToDelete.Len() != 0 {
|
||||
ctx.gc.attemptToDeleteWorker(context.TODO())
|
||||
ctx.gc.processAttemptToDeleteWorker(context.TODO())
|
||||
}
|
||||
} else {
|
||||
for i := 0; i < count; i++ {
|
||||
@@ -2453,7 +2453,7 @@ func processAttemptToDelete(count int) step {
|
||||
ctx.t.Errorf("expected at least %d pending changes, got %d", count, i+1)
|
||||
return
|
||||
}
|
||||
ctx.gc.attemptToDeleteWorker(context.TODO())
|
||||
ctx.gc.processAttemptToDeleteWorker(context.TODO())
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user