Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit a016eb8

Browse files
committedApr 9, 2025·
Fix tests and some underlying bugs
1 parent 86ea936 commit a016eb8

12 files changed

+862
-516
lines changed
 

‎util/src/main/java/io/grpc/util/OutlierDetectionLoadBalancer.java

+21
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@
4747
import java.util.HashSet;
4848
import java.util.List;
4949
import java.util.Map;
50+
import java.util.Objects;
5051
import java.util.Random;
5152
import java.util.Set;
5253
import java.util.concurrent.ScheduledExecutorService;
@@ -1062,6 +1063,26 @@ public static class SuccessRateEjection {
10621063
this.requestVolume = requestVolume;
10631064
}
10641065

1066+
@Override
1067+
public int hashCode() {
1068+
return Objects.hash(stdevFactor, enforcementPercentage, minimumHosts, requestVolume);
1069+
}
1070+
1071+
@Override
1072+
public boolean equals(Object obj) {
1073+
if (this == obj) {
1074+
return true;
1075+
}
1076+
if (! (obj instanceof SuccessRateEjection)) {
1077+
return false;
1078+
}
1079+
return Objects.equals(stdevFactor, ((SuccessRateEjection) obj).stdevFactor)
1080+
&& Objects.equals(
1081+
enforcementPercentage, ((SuccessRateEjection) obj).enforcementPercentage)
1082+
&& Objects.equals(minimumHosts, ((SuccessRateEjection) obj).minimumHosts)
1083+
&& Objects.equals(requestVolume, ((SuccessRateEjection) obj).requestVolume);
1084+
}
1085+
10651086
/** Builds new instances of {@link SuccessRateEjection}. */
10661087
public static final class Builder {
10671088

‎xds/src/main/java/io/grpc/xds/CdsLoadBalancer2.java

+57-263
Large diffs are not rendered by default.

‎xds/src/main/java/io/grpc/xds/XdsAttributes.java

+10-1
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,21 @@ final class XdsAttributes {
3737
Attributes.Key.create("io.grpc.xds.XdsAttributes.xdsClientPool");
3838

3939
/**
40-
* Attribute key for passing around the XdsClient object pool across NameResolver/LoadBalancers.
40+
* Attribute key for passing around the latest XdsConfig across NameResolver/LoadBalancers.
4141
*/
4242
@NameResolver.ResolutionResultAttr
4343
static final Attributes.Key<XdsConfig> XDS_CONFIG =
4444
Attributes.Key.create("io.grpc.xds.XdsAttributes.xdsConfig");
4545

46+
47+
/**
48+
* Attribute key for passing around the XdsDependencyManager across NameResolver/LoadBalancers.
49+
*/
50+
@NameResolver.ResolutionResultAttr
51+
static final Attributes.Key<XdsConfig.XdsClusterSubscriptionRegistry>
52+
XDS_CLUSTER_SUBSCRIPT_REGISTRY =
53+
Attributes.Key.create("io.grpc.xds.XdsAttributes.xdsConfig.XdsClusterSubscriptionRegistry");
54+
4655
/**
4756
* Attribute key for obtaining the global provider that provides atomics for aggregating
4857
* outstanding RPCs sent to each cluster.

‎xds/src/main/java/io/grpc/xds/XdsClusterResource.java

+19
Original file line numberDiff line numberDiff line change
@@ -643,6 +643,25 @@ private static Builder newBuilder(String clusterName) {
643643
.parsedMetadata(ImmutableMap.of());
644644
}
645645

646+
Builder toBuilder() {
647+
return new AutoValue_XdsClusterResource_CdsUpdate.Builder()
648+
.choiceCount(choiceCount())
649+
.clusterName(clusterName())
650+
.clusterType(clusterType())
651+
.dnsHostName(dnsHostName())
652+
.edsServiceName(edsServiceName())
653+
.lrsServerInfo(lrsServerInfo())
654+
.maxConcurrentRequests(maxConcurrentRequests())
655+
.maxRingSize(maxRingSize())
656+
.minRingSize(minRingSize())
657+
.lbPolicyConfig(lbPolicyConfig())
658+
.upstreamTlsContext(upstreamTlsContext())
659+
.prioritizedClusterNames(prioritizedClusterNames())
660+
.outlierDetection(outlierDetection())
661+
.filterMetadata(filterMetadata())
662+
.parsedMetadata(parsedMetadata());
663+
}
664+
646665
static Builder forAggregate(String clusterName, List<String> prioritizedClusterNames) {
647666
checkNotNull(prioritizedClusterNames, "prioritizedClusterNames");
648667
return newBuilder(clusterName)

‎xds/src/main/java/io/grpc/xds/XdsDependencyManager.java

+383-41
Large diffs are not rendered by default.

‎xds/src/main/java/io/grpc/xds/XdsNameResolver.java

+18-6
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@ final class XdsNameResolver extends NameResolver {
129129
private final ConfigSelector configSelector = new ConfigSelector();
130130
private final long randomChannelId;
131131
private final MetricRecorder metricRecorder;
132+
private final Args nameResolverArgs;
132133

133134
private volatile RoutingConfig routingConfig = RoutingConfig.EMPTY;
134135
private Listener2 listener;
@@ -145,11 +146,11 @@ final class XdsNameResolver extends NameResolver {
145146
ServiceConfigParser serviceConfigParser,
146147
SynchronizationContext syncContext, ScheduledExecutorService scheduler,
147148
@Nullable Map<String, ?> bootstrapOverride,
148-
MetricRecorder metricRecorder) {
149+
MetricRecorder metricRecorder, Args nameResolverArgs) {
149150
this(targetUri, targetUri.getAuthority(), name, overrideAuthority, serviceConfigParser,
150151
syncContext, scheduler, SharedXdsClientPoolProvider.getDefaultProvider(),
151152
ThreadSafeRandomImpl.instance, FilterRegistry.getDefaultRegistry(), bootstrapOverride,
152-
metricRecorder);
153+
metricRecorder, nameResolverArgs);
153154
}
154155

155156
@VisibleForTesting
@@ -159,7 +160,7 @@ final class XdsNameResolver extends NameResolver {
159160
SynchronizationContext syncContext, ScheduledExecutorService scheduler,
160161
XdsClientPoolFactory xdsClientPoolFactory, ThreadSafeRandom random,
161162
FilterRegistry filterRegistry, @Nullable Map<String, ?> bootstrapOverride,
162-
MetricRecorder metricRecorder) {
163+
MetricRecorder metricRecorder, Args nameResolverArgs) {
163164
this.targetAuthority = targetAuthority;
164165
target = targetUri.toString();
165166

@@ -172,12 +173,15 @@ final class XdsNameResolver extends NameResolver {
172173
this.serviceConfigParser = checkNotNull(serviceConfigParser, "serviceConfigParser");
173174
this.syncContext = checkNotNull(syncContext, "syncContext");
174175
this.scheduler = checkNotNull(scheduler, "scheduler");
175-
this.xdsClientPoolFactory = bootstrapOverride == null ? checkNotNull(xdsClientPoolFactory,
176-
"xdsClientPoolFactory") : new SharedXdsClientPoolProvider();
176+
this.xdsClientPoolFactory = bootstrapOverride == null
177+
? checkNotNull(xdsClientPoolFactory, "xdsClientPoolFactory")
178+
: new SharedXdsClientPoolProvider();
177179
this.xdsClientPoolFactory.setBootstrapOverride(bootstrapOverride);
178180
this.random = checkNotNull(random, "random");
179181
this.filterRegistry = checkNotNull(filterRegistry, "filterRegistry");
180182
this.metricRecorder = metricRecorder;
183+
this.nameResolverArgs = nameResolverArgs;
184+
181185
randomChannelId = random.nextLong();
182186
logId = InternalLogId.allocate("xds-resolver", name);
183187
logger = XdsLogger.withLogId(logId);
@@ -234,6 +238,12 @@ private static String expandPercentS(String template, String replacement) {
234238
return template.replace("%s", replacement);
235239
}
236240

241+
@Override
242+
public void refresh() {
243+
super.refresh();
244+
resolveState2.xdsDependencyManager.requestReresolution();
245+
}
246+
237247
@Override
238248
public void shutdown() {
239249
logger.log(XdsLogLevel.INFO, "Shutdown");
@@ -310,6 +320,7 @@ private void updateResolutionResult() {
310320
Attributes.newBuilder()
311321
.set(XdsAttributes.XDS_CLIENT_POOL, xdsClientPool)
312322
.set(XdsAttributes.XDS_CONFIG, resolveState2.lastConfig)
323+
.set(XdsAttributes.XDS_CLUSTER_SUBSCRIPT_REGISTRY, resolveState2.xdsDependencyManager)
313324
.set(XdsAttributes.CALL_COUNTER_PROVIDER, callCounterProvider)
314325
.set(InternalConfigSelector.KEY, configSelector)
315326
.build();
@@ -650,7 +661,8 @@ class ResolveState2 implements XdsDependencyManager.XdsConfigWatcher {
650661
private ResolveState2(String ldsResourceName) {
651662
authority = overrideAuthority != null ? overrideAuthority : encodedServiceAuthority;
652663
xdsDependencyManager =
653-
new XdsDependencyManager(xdsClient, this, syncContext, authority, ldsResourceName );
664+
new XdsDependencyManager(xdsClient, this, syncContext, authority, ldsResourceName,
665+
nameResolverArgs, scheduler );
654666
}
655667

656668
private void shutdown() {

‎xds/src/main/java/io/grpc/xds/XdsNameResolverProvider.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ public XdsNameResolver newNameResolver(URI targetUri, Args args) {
8282
args.getServiceConfigParser(), args.getSynchronizationContext(),
8383
args.getScheduledExecutorService(),
8484
bootstrapOverride,
85-
args.getMetricRecorder());
85+
args.getMetricRecorder(), args);
8686
}
8787
return null;
8888
}

‎xds/src/test/java/io/grpc/xds/CdsLoadBalancer2Test.java

+163-122
Large diffs are not rendered by default.

‎xds/src/test/java/io/grpc/xds/ClusterResolverLoadBalancerTest.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ public class ClusterResolverLoadBalancerTest {
148148
Collections.emptyMap(), outlierDetection, null);
149149
private final DiscoveryMechanism logicalDnsDiscoveryMechanism =
150150
DiscoveryMechanism.forLogicalDns(CLUSTER_DNS, DNS_HOST_NAME, LRS_SERVER_INFO, 300L, null,
151-
Collections.emptyMap());
151+
Collections.emptyMap(), null);
152152

153153
private final SynchronizationContext syncContext = new SynchronizationContext(
154154
new Thread.UncaughtExceptionHandler() {

‎xds/src/test/java/io/grpc/xds/XdsDependencyManagerTest.java

+156-47
Large diffs are not rendered by default.

‎xds/src/test/java/io/grpc/xds/XdsNameResolverTest.java

+33-31
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@
4545
import com.google.re2j.Pattern;
4646
import io.grpc.CallOptions;
4747
import io.grpc.Channel;
48+
import io.grpc.ChannelLogger;
4849
import io.grpc.ClientCall;
4950
import io.grpc.ClientInterceptor;
5051
import io.grpc.ClientInterceptors;
@@ -69,6 +70,7 @@
6970
import io.grpc.SynchronizationContext;
7071
import io.grpc.internal.AutoConfiguredLoadBalancerFactory;
7172
import io.grpc.internal.FakeClock;
73+
import io.grpc.internal.GrpcUtil;
7274
import io.grpc.internal.JsonParser;
7375
import io.grpc.internal.JsonUtil;
7476
import io.grpc.internal.ObjectPool;
@@ -114,7 +116,6 @@
114116
import java.util.concurrent.ScheduledExecutorService;
115117
import java.util.concurrent.TimeUnit;
116118
import java.util.concurrent.atomic.AtomicLong;
117-
import java.util.stream.Collectors;
118119
import javax.annotation.Nullable;
119120
import org.junit.After;
120121
import org.junit.Before;
@@ -182,6 +183,15 @@ public ConfigOrError parseServiceConfig(Map<String, ?> rawServiceConfig) {
182183
private TestCall<?, ?> testCall;
183184
private boolean originalEnableTimeout;
184185
private URI targetUri;
186+
private final NameResolver.Args nameResolverArgs = NameResolver.Args.newBuilder()
187+
.setDefaultPort(8080)
188+
.setProxyDetector(GrpcUtil.DEFAULT_PROXY_DETECTOR)
189+
.setSynchronizationContext(syncContext)
190+
.setServiceConfigParser(mock(NameResolver.ServiceConfigParser.class))
191+
.setChannelLogger(mock(ChannelLogger.class))
192+
.setScheduledExecutorService(fakeClock.getScheduledExecutorService())
193+
.build();
194+
185195

186196
@Before
187197
public void setUp() {
@@ -208,7 +218,7 @@ public void setUp() {
208218

209219
resolver = new XdsNameResolver(targetUri, null, AUTHORITY, null,
210220
serviceConfigParser, syncContext, scheduler,
211-
xdsClientPoolFactory, mockRandom, filterRegistry, null, metricRecorder);
221+
xdsClientPoolFactory, mockRandom, filterRegistry, null, metricRecorder, nameResolverArgs);
212222
}
213223

214224
@After
@@ -250,7 +260,7 @@ public List<String> getTargets() {
250260
resolver = new XdsNameResolver(targetUri, null, AUTHORITY, null,
251261
serviceConfigParser, syncContext, scheduler,
252262
xdsClientPoolFactory, mockRandom, FilterRegistry.getDefaultRegistry(), null,
253-
metricRecorder);
263+
metricRecorder, nameResolverArgs);
254264
resolver.start(mockListener);
255265
verify(mockListener).onError(errorCaptor.capture());
256266
Status error = errorCaptor.getValue();
@@ -264,7 +274,7 @@ public void resolving_withTargetAuthorityNotFound() {
264274
resolver = new XdsNameResolver(targetUri,
265275
"notfound.google.com", AUTHORITY, null, serviceConfigParser, syncContext, scheduler,
266276
xdsClientPoolFactory, mockRandom, FilterRegistry.getDefaultRegistry(), null,
267-
metricRecorder);
277+
metricRecorder, nameResolverArgs);
268278
resolver.start(mockListener);
269279
verify(mockListener).onError(errorCaptor.capture());
270280
Status error = errorCaptor.getValue();
@@ -286,7 +296,7 @@ public void resolving_noTargetAuthority_templateWithoutXdstp() {
286296
resolver = new XdsNameResolver(
287297
targetUri, null, serviceAuthority, null, serviceConfigParser, syncContext,
288298
scheduler, xdsClientPoolFactory,
289-
mockRandom, FilterRegistry.getDefaultRegistry(), null, metricRecorder);
299+
mockRandom, FilterRegistry.getDefaultRegistry(), null, metricRecorder, nameResolverArgs);
290300
resolver.start(mockListener);
291301
verify(mockListener, never()).onError(any(Status.class));
292302
}
@@ -307,7 +317,7 @@ public void resolving_noTargetAuthority_templateWithXdstp() {
307317
resolver = new XdsNameResolver(
308318
targetUri, null, serviceAuthority, null, serviceConfigParser, syncContext, scheduler,
309319
xdsClientPoolFactory, mockRandom, FilterRegistry.getDefaultRegistry(), null,
310-
metricRecorder);
320+
metricRecorder, nameResolverArgs);
311321
resolver.start(mockListener);
312322
verify(mockListener, never()).onError(any(Status.class));
313323
}
@@ -328,7 +338,7 @@ public void resolving_noTargetAuthority_xdstpWithMultipleSlashes() {
328338
resolver = new XdsNameResolver(
329339
targetUri, null, serviceAuthority, null, serviceConfigParser, syncContext, scheduler,
330340
xdsClientPoolFactory, mockRandom, FilterRegistry.getDefaultRegistry(), null,
331-
metricRecorder);
341+
metricRecorder, nameResolverArgs);
332342

333343

334344
// The Service Authority must be URL encoded, but unlike the LDS resource name.
@@ -357,7 +367,7 @@ public void resolving_targetAuthorityInAuthoritiesMap() {
357367
resolver = new XdsNameResolver(targetUri,
358368
"xds.authority.com", serviceAuthority, null, serviceConfigParser, syncContext, scheduler,
359369
xdsClientPoolFactory, mockRandom, FilterRegistry.getDefaultRegistry(), null,
360-
metricRecorder);
370+
metricRecorder, nameResolverArgs);
361371
resolver.start(mockListener);
362372
verify(mockListener, never()).onError(any(Status.class));
363373
}
@@ -390,7 +400,7 @@ public void resolving_ldsResourceUpdateRdsName() {
390400
resolver = new XdsNameResolver(targetUri, null, AUTHORITY, null,
391401
serviceConfigParser, syncContext, scheduler,
392402
xdsClientPoolFactory, mockRandom, FilterRegistry.getDefaultRegistry(), null,
393-
metricRecorder);
403+
metricRecorder, nameResolverArgs);
394404
// use different ldsResourceName and service authority. The virtualhost lookup should use
395405
// service authority.
396406
expectedLdsResourceName = "test-" + expectedLdsResourceName;
@@ -577,7 +587,7 @@ public void resolving_matchingVirtualHostNotFound_matchingOverrideAuthority() {
577587
resolver = new XdsNameResolver(targetUri, null, AUTHORITY, "random",
578588
serviceConfigParser, syncContext, scheduler,
579589
xdsClientPoolFactory, mockRandom, FilterRegistry.getDefaultRegistry(), null,
580-
metricRecorder);
590+
metricRecorder, nameResolverArgs);
581591
resolver.start(mockListener);
582592
FakeXdsClient xdsClient = (FakeXdsClient) resolver.getXdsClient();
583593
xdsClient.deliverLdsUpdate(0L, Arrays.asList(virtualHost));
@@ -602,7 +612,7 @@ public void resolving_matchingVirtualHostNotFound_notMatchingOverrideAuthority()
602612
resolver = new XdsNameResolver(targetUri, null, AUTHORITY, "random",
603613
serviceConfigParser, syncContext, scheduler,
604614
xdsClientPoolFactory, mockRandom, FilterRegistry.getDefaultRegistry(), null,
605-
metricRecorder);
615+
metricRecorder, nameResolverArgs);
606616
resolver.start(mockListener);
607617
FakeXdsClient xdsClient = (FakeXdsClient) resolver.getXdsClient();
608618
// TODO Why does the test expect to have listener.onResult() called when this produces an error
@@ -616,7 +626,7 @@ public void resolving_matchingVirtualHostNotFoundForOverrideAuthority() {
616626
resolver = new XdsNameResolver(targetUri, null, AUTHORITY, AUTHORITY,
617627
serviceConfigParser, syncContext, scheduler,
618628
xdsClientPoolFactory, mockRandom, FilterRegistry.getDefaultRegistry(), null,
619-
metricRecorder);
629+
metricRecorder, nameResolverArgs);
620630
resolver.start(mockListener);
621631
FakeXdsClient xdsClient = (FakeXdsClient) resolver.getXdsClient();
622632
xdsClient.deliverLdsUpdate(0L, buildUnmatchedVirtualHosts());
@@ -701,7 +711,7 @@ public void retryPolicyInPerMethodConfigGeneratedByResolverIsValid() {
701711
true, 5, 5, new AutoConfiguredLoadBalancerFactory("pick-first"));
702712
resolver = new XdsNameResolver(targetUri, null, AUTHORITY, null, realParser, syncContext,
703713
scheduler, xdsClientPoolFactory, mockRandom, FilterRegistry.getDefaultRegistry(), null,
704-
metricRecorder);
714+
metricRecorder, nameResolverArgs);
705715
resolver.start(mockListener);
706716
FakeXdsClient xdsClient = (FakeXdsClient) resolver.getXdsClient();
707717
RetryPolicy retryPolicy = RetryPolicy.create(
@@ -912,7 +922,7 @@ public void resolved_rpcHashingByChannelId() {
912922
resolver = new XdsNameResolver(targetUri, null, AUTHORITY, null, serviceConfigParser,
913923
syncContext, scheduler,
914924
xdsClientPoolFactory, mockRandom, FilterRegistry.getDefaultRegistry(), null,
915-
metricRecorder);
925+
metricRecorder, nameResolverArgs);
916926
resolver.start(mockListener);
917927
xdsClient = (FakeXdsClient) resolver.getXdsClient();
918928
xdsClient.deliverLdsUpdate(
@@ -945,7 +955,7 @@ public void resolved_rpcHashingByChannelId() {
945955
public void resolved_routeActionHasAutoHostRewrite_emitsCallOptionForTheSame() {
946956
resolver = new XdsNameResolver(targetUri, null, AUTHORITY, null, serviceConfigParser,
947957
syncContext, scheduler, xdsClientPoolFactory, mockRandom,
948-
FilterRegistry.getDefaultRegistry(), null, metricRecorder);
958+
FilterRegistry.getDefaultRegistry(), null, metricRecorder, nameResolverArgs);
949959
resolver.start(mockListener);
950960
FakeXdsClient xdsClient = (FakeXdsClient) resolver.getXdsClient();
951961
xdsClient.deliverLdsUpdate(
@@ -976,7 +986,7 @@ public void resolved_routeActionHasAutoHostRewrite_emitsCallOptionForTheSame() {
976986
public void resolved_routeActionNoAutoHostRewrite_doesntEmitCallOptionForTheSame() {
977987
resolver = new XdsNameResolver(targetUri, null, AUTHORITY, null, serviceConfigParser,
978988
syncContext, scheduler, xdsClientPoolFactory, mockRandom,
979-
FilterRegistry.getDefaultRegistry(), null, metricRecorder);
989+
FilterRegistry.getDefaultRegistry(), null, metricRecorder, nameResolverArgs);
980990
resolver.start(mockListener);
981991
FakeXdsClient xdsClient = (FakeXdsClient) resolver.getXdsClient();
982992
xdsClient.deliverLdsUpdate(
@@ -1190,7 +1200,8 @@ public void resolved_simpleCallSucceeds_routeToWeightedCluster() {
11901200
}
11911201

11921202
/** Creates and delivers both CDS and EDS updates for the given clusters. */
1193-
private static void createAndDeliverClusterUpdates(FakeXdsClient xdsClient, String... clusterNames) {
1203+
private static void createAndDeliverClusterUpdates(
1204+
FakeXdsClient xdsClient, String... clusterNames) {
11941205
for (String clusterName : clusterNames) {
11951206
CdsUpdate.Builder forEds = CdsUpdate.forEds(clusterName, clusterName, null, null, null, null)
11961207
.roundRobinLbPolicy();
@@ -2110,10 +2121,10 @@ public <T extends ResourceUpdate> void watchXdsResource(XdsResourceType<T> resou
21102121
rdsResource = resourceName;
21112122
rdsWatcher = (ResourceWatcher<RdsUpdate>) watcher;
21122123
break;
2113-
case "CDS":
2114-
cdsWatchers.computeIfAbsent(resourceName, k -> new ArrayList<>())
2115-
.add((ResourceWatcher<CdsUpdate>) watcher);
2116-
break;
2124+
case "CDS":
2125+
cdsWatchers.computeIfAbsent(resourceName, k -> new ArrayList<>())
2126+
.add((ResourceWatcher<CdsUpdate>) watcher);
2127+
break;
21172128
case "EDS":
21182129
edsWatchers.computeIfAbsent(resourceName, k -> new ArrayList<>())
21192130
.add((ResourceWatcher<EdsUpdate>) watcher);
@@ -2154,6 +2165,7 @@ public <T extends ResourceUpdate> void cancelXdsResourceWatch(XdsResourceType<T>
21542165
default:
21552166
}
21562167
}
2168+
21572169
void deliverLdsUpdateOnly(long httpMaxStreamDurationNano, List<VirtualHost> virtualHosts) {
21582170
syncContext.execute(() -> {
21592171
ldsWatcher.onChanged(LdsUpdate.forApiListener(HttpConnectionManager.forVirtualHosts(
@@ -2362,16 +2374,6 @@ private void deliverCdsUpdate(String clusterName, CdsUpdate update) {
23622374
});
23632375
}
23642376

2365-
private void deliverCdsResourceNotExist(String clusterName) {
2366-
if (!cdsWatchers.containsKey(clusterName)) {
2367-
return;
2368-
}
2369-
syncContext.execute(() -> {
2370-
ImmutableList.copyOf(cdsWatchers.get(clusterName))
2371-
.forEach(w -> w.onResourceDoesNotExist(clusterName));
2372-
});
2373-
}
2374-
23752377
private void deliverEdsUpdate(String name, EdsUpdate update) {
23762378
syncContext.execute(() -> {
23772379
if (!edsWatchers.containsKey(name)) {

‎xds/src/test/java/io/grpc/xds/XdsTestUtils.java

-3
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,6 @@
2424
import static org.mockito.ArgumentMatchers.argThat;
2525
import static org.mockito.Mockito.inOrder;
2626
import static org.mockito.Mockito.mock;
27-
import static org.mockito.Mockito.verify;
28-
import static org.mockito.Mockito.verifyNoMoreInteractions;
2927

3028
import com.google.common.base.Splitter;
3129
import com.google.common.collect.ImmutableList;
@@ -35,7 +33,6 @@
3533
import com.google.protobuf.BoolValue;
3634
import com.google.protobuf.Message;
3735
import com.google.protobuf.util.Durations;
38-
import com.google.rpc.Code;
3936
import io.envoyproxy.envoy.config.cluster.v3.Cluster;
4037
import io.envoyproxy.envoy.config.core.v3.Node;
4138
import io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment;

0 commit comments

Comments
 (0)
Please sign in to comment.