grpc-go icon indicating copy to clipboard operation
grpc-go copied to clipboard

xds: Fix flaky test HandleListenerUpdate_ErrorUpdate

Open arjan-bal opened this issue 4 months ago • 1 comments

Fixes: https://github.com/grpc/grpc-go/issues/8305

After https://github.com/grpc/grpc-go/pull/7977 the server's serving mode started being updated to NOT_SERVING every time a listener resource is NACKed. During the test, the xDS management server replies with the same resource version if a after client NACKs a resource. The test registers a callback that pushes the serving mode state updates to a buffered channel of size 1. The channel gets filled and blocks the test indefinitely.

This PR ensures we only keep the latest serving mode in the channel to avoid deadlocks. Verified that the test doesn't flake in 100k runs on forge.

RELEASE NOTES: N/A

arjan-bal avatar Jun 12 '25 11:06 arjan-bal