Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xds: fix test failure in xds flow control #10773

Merged
merged 2 commits into from
Dec 20, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions xds/src/test/java/io/grpc/xds/XdsClientImplTestBase.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.eq;
import static org.mockito.ArgumentMatchers.isA;
import static org.mockito.Mockito.atLeastOnce;
import static org.mockito.Mockito.doAnswer;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.never;
Expand Down Expand Up @@ -3004,7 +3005,7 @@ public void flowControlAbsent() throws Exception {
verifyResourceMetadataAcked(
CDS, CDS_RESOURCE, testClusterRoundRobin, VERSION_1, TIME_INCREMENT);
barrier.await();
verify(cdsResourceWatcher, times(1)).onChanged(any());
verify(cdsResourceWatcher, atLeastOnce()).onChanged(any());
String errorMsg = "CDS response Cluster 'cluster.googleapis.com2' validation error: "
+ "Cluster cluster.googleapis.com2: unspecified cluster discovery type";
call.verifyRequestNack(CDS, Arrays.asList(CDS_RESOURCE, anotherCdsResource), VERSION_1, "0001",
Expand Down Expand Up @@ -3067,8 +3068,8 @@ public void simpleFlowControl() throws Exception {
verifyResourceMetadataAcked(EDS, EDS_RESOURCE, testClusterLoadAssignment, VERSION_1,
TIME_INCREMENT);
barrier.await();
verify(edsResourceWatcher, times(1)).onChanged(edsUpdateCaptor.capture());
EdsUpdate edsUpdate = edsUpdateCaptor.getValue();
verify(edsResourceWatcher, atLeastOnce()).onChanged(edsUpdateCaptor.capture());
EdsUpdate edsUpdate = edsUpdateCaptor.getAllValues().get(0);
validateGoldenClusterLoadAssignment(edsUpdate);
barrier.await();
latch.await(10, TimeUnit.SECONDS);
Expand Down