kubernetes/pkg/controller/nodeipam
Davanum Srinivas 5d3e8d9db6
nodeipam: buffer TestNodeSyncResync report notifications
TestNodeSyncResync closes opChan after observing the first resync and then
waits for the loop to exit. There is still a small window where the 1ms
resync timer fires again before the select notices the closed channel.
When that happens ReportResult sends a second notification on the
unbuffered reportChan, the loop blocks in the send, and the test waits
forever on doneChan.

Allow one queued notification so the loop can drain that race and reach
the closed opChan case. The test still validates that a resync happened;
it just stops depending on exact scheduling between two ready events.

Tested:
go test -race ./pkg/controller/nodeipam/ipam/sync -run TestNodeSyncResync -count=200
2026-03-14 11:58:31 -04:00
..
config remove import doc comments 2024-12-02 16:59:34 +01:00
ipam nodeipam: buffer TestNodeSyncResync report notifications 2026-03-14 11:58:31 -04:00
doc.go remove import doc comments 2024-12-02 16:59:34 +01:00
node_ipam_controller.go controller/nodeipam: Improve goroutine mgmt 2025-10-29 19:04:38 +01:00
nolegacyprovider.go Remove gcp in-tree cloud provider and credential provider 2024-05-01 09:03:53 -04:00
OWNERS update sig-network reviewers/approvers on controller manager 2022-09-19 10:34:39 +02:00