mirror of https://github.com/grpc/grpc-java.git
xds: fix flow control test failure (#10773)
This commit is contained in:
parent
7be2b6c08d
commit
f67ec2ecd9
|
|
@ -22,6 +22,7 @@ import static io.grpc.xds.XdsClientImpl.XdsChannelFactory.DEFAULT_XDS_CHANNEL_FA
|
||||||
import static org.mockito.ArgumentMatchers.any;
|
import static org.mockito.ArgumentMatchers.any;
|
||||||
import static org.mockito.ArgumentMatchers.eq;
|
import static org.mockito.ArgumentMatchers.eq;
|
||||||
import static org.mockito.ArgumentMatchers.isA;
|
import static org.mockito.ArgumentMatchers.isA;
|
||||||
|
import static org.mockito.Mockito.atLeastOnce;
|
||||||
import static org.mockito.Mockito.doAnswer;
|
import static org.mockito.Mockito.doAnswer;
|
||||||
import static org.mockito.Mockito.mock;
|
import static org.mockito.Mockito.mock;
|
||||||
import static org.mockito.Mockito.never;
|
import static org.mockito.Mockito.never;
|
||||||
|
|
@ -3004,7 +3005,7 @@ public abstract class XdsClientImplTestBase {
|
||||||
verifyResourceMetadataAcked(
|
verifyResourceMetadataAcked(
|
||||||
CDS, CDS_RESOURCE, testClusterRoundRobin, VERSION_1, TIME_INCREMENT);
|
CDS, CDS_RESOURCE, testClusterRoundRobin, VERSION_1, TIME_INCREMENT);
|
||||||
barrier.await();
|
barrier.await();
|
||||||
verify(cdsResourceWatcher, times(1)).onChanged(any());
|
verify(cdsResourceWatcher, atLeastOnce()).onChanged(any());
|
||||||
String errorMsg = "CDS response Cluster 'cluster.googleapis.com2' validation error: "
|
String errorMsg = "CDS response Cluster 'cluster.googleapis.com2' validation error: "
|
||||||
+ "Cluster cluster.googleapis.com2: unspecified cluster discovery type";
|
+ "Cluster cluster.googleapis.com2: unspecified cluster discovery type";
|
||||||
call.verifyRequestNack(CDS, Arrays.asList(CDS_RESOURCE, anotherCdsResource), VERSION_1, "0001",
|
call.verifyRequestNack(CDS, Arrays.asList(CDS_RESOURCE, anotherCdsResource), VERSION_1, "0001",
|
||||||
|
|
@ -3067,8 +3068,8 @@ public abstract class XdsClientImplTestBase {
|
||||||
verifyResourceMetadataAcked(EDS, EDS_RESOURCE, testClusterLoadAssignment, VERSION_1,
|
verifyResourceMetadataAcked(EDS, EDS_RESOURCE, testClusterLoadAssignment, VERSION_1,
|
||||||
TIME_INCREMENT);
|
TIME_INCREMENT);
|
||||||
barrier.await();
|
barrier.await();
|
||||||
verify(edsResourceWatcher, times(1)).onChanged(edsUpdateCaptor.capture());
|
verify(edsResourceWatcher, atLeastOnce()).onChanged(edsUpdateCaptor.capture());
|
||||||
EdsUpdate edsUpdate = edsUpdateCaptor.getValue();
|
EdsUpdate edsUpdate = edsUpdateCaptor.getAllValues().get(0);
|
||||||
validateGoldenClusterLoadAssignment(edsUpdate);
|
validateGoldenClusterLoadAssignment(edsUpdate);
|
||||||
barrier.await();
|
barrier.await();
|
||||||
latch.await(10, TimeUnit.SECONDS);
|
latch.await(10, TimeUnit.SECONDS);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue