Merge pull request #116557 from smarterclayton/sync_known_race

kubelet: TestSyncKnownPods should not race
This commit is contained in:
Kubernetes Prow Robot 2023-03-13 22:27:24 -07:00 committed by GitHub
commit dfc63f218c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1637,7 +1637,8 @@ func TestSyncKnownPods(t *testing.T) {
// verify workers that are not terminated stay open even if config no longer
// sees them
podWorkers.SyncKnownPods(nil)
if len(podWorkers.podUpdates) != 2 {
drainAllWorkers(podWorkers)
if len(podWorkers.podUpdates) != 0 {
t.Errorf("Incorrect number of open channels %v", len(podWorkers.podUpdates))
}
if len(podWorkers.podSyncStatuses) != 2 {