]> git.feebdaed.xyz Git - 0xmirror/grpc-go.git/commit
xdsclient: fix the flaky ADS stream restart test (#8631)
authorEaswar Swaminathan <easwars@google.com>
Thu, 9 Oct 2025 06:52:26 +0000 (23:52 -0700)
committerGitHub <noreply@github.com>
Thu, 9 Oct 2025 06:52:26 +0000 (23:52 -0700)
commit8110884be128afca96c21ca7ff15a490993f9a7b
treebb982ca12984c883054002fe912aa9deea0271e3
parent74b65af7f71595616951d56a28ec5f87e1050b8b
xdsclient: fix the flaky ADS stream restart test (#8631)

The ADS stream restart test can be flaky for the following reason:
- It requests a CDS resource and unrequests it before the stream breaks.
- And then once the stream restarts, it verifies that this resource is
not requested again.
- But the ACK for this resource may or may not be received at the
management server before the stream breaks. This can falsely cause the
test to conclude that the request was re-requested after the restart.

This PR changes the test in the following ways:
- Use a single resource
- Verify ACK before the stream is restarted

Ran a million times without flakes on Forge.

RELEASE NOTES: NONE
internal/xds/xdsclient/tests/ads_stream_restart_test.go