mirror of https://github.com/grpc/grpc-java.git
all: fix lint
This commit is contained in:
parent
ae14c8d061
commit
53f74c62ba
|
|
@ -101,7 +101,6 @@ import io.grpc.ServerMethodDefinition;
|
|||
import io.grpc.Status;
|
||||
import io.grpc.Status.Code;
|
||||
import io.grpc.StringMarshaller;
|
||||
import io.grpc.SynchronizationContext;
|
||||
import io.grpc.internal.ClientTransportFactory.ClientTransportOptions;
|
||||
import io.grpc.internal.InternalSubchannel.TransportLogger;
|
||||
import io.grpc.internal.ManagedChannelImpl.ScParser;
|
||||
|
|
@ -1609,7 +1608,7 @@ public class ManagedChannelImplTest {
|
|||
ses.shutdownNow();
|
||||
fail("Should throw");
|
||||
} catch (UnsupportedOperationException e) {
|
||||
// exepcted
|
||||
// expected
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -3397,10 +3396,6 @@ public class ManagedChannelImplTest {
|
|||
|
||||
@Test
|
||||
public void nameResolverHelper_emptyConfigSucceeds() {
|
||||
int defaultPort = 1;
|
||||
ProxyDetector proxyDetector = GrpcUtil.getDefaultProxyDetector();
|
||||
SynchronizationContext syncCtx =
|
||||
new SynchronizationContext(Thread.currentThread().getUncaughtExceptionHandler());
|
||||
boolean retryEnabled = false;
|
||||
int maxRetryAttemptsLimit = 2;
|
||||
int maxHedgedAttemptsLimit = 3;
|
||||
|
|
@ -3423,10 +3418,6 @@ public class ManagedChannelImplTest {
|
|||
|
||||
@Test
|
||||
public void nameResolverHelper_badConfigFails() {
|
||||
int defaultPort = 1;
|
||||
ProxyDetector proxyDetector = GrpcUtil.getDefaultProxyDetector();
|
||||
SynchronizationContext syncCtx =
|
||||
new SynchronizationContext(Thread.currentThread().getUncaughtExceptionHandler());
|
||||
boolean retryEnabled = false;
|
||||
int maxRetryAttemptsLimit = 2;
|
||||
int maxHedgedAttemptsLimit = 3;
|
||||
|
|
@ -3450,10 +3441,6 @@ public class ManagedChannelImplTest {
|
|||
|
||||
@Test
|
||||
public void nameResolverHelper_noConfigChosen() {
|
||||
int defaultPort = 1;
|
||||
ProxyDetector proxyDetector = GrpcUtil.getDefaultProxyDetector();
|
||||
SynchronizationContext syncCtx =
|
||||
new SynchronizationContext(Thread.currentThread().getUncaughtExceptionHandler());
|
||||
boolean retryEnabled = false;
|
||||
int maxRetryAttemptsLimit = 2;
|
||||
int maxHedgedAttemptsLimit = 3;
|
||||
|
|
|
|||
|
|
@ -73,9 +73,9 @@ interface LocalityStore {
|
|||
|
||||
private final Helper helper;
|
||||
private final PickerFactory pickerFactory;
|
||||
private final LoadBalancerProvider loadBalancerProvider;
|
||||
|
||||
private Map<Locality, LocalityLbInfo> localityMap = new HashMap<>();
|
||||
private LoadBalancerProvider loadBalancerProvider;
|
||||
private ConnectivityState overallState;
|
||||
|
||||
LocalityStoreImpl(Helper helper, LoadBalancerRegistry lbRegistry) {
|
||||
|
|
|
|||
|
|
@ -60,7 +60,6 @@ import io.grpc.xds.XdsComms.LbEndpoint;
|
|||
import io.grpc.xds.XdsComms.Locality;
|
||||
import io.grpc.xds.XdsComms.LocalityInfo;
|
||||
import java.net.InetSocketAddress;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
|
|
@ -139,7 +138,6 @@ public class XdsLbStateTest {
|
|||
});
|
||||
|
||||
private final StreamRecorder<DiscoveryRequest> streamRecorder = StreamRecorder.create();
|
||||
private StreamObserver<DiscoveryResponse> responseWriter;
|
||||
private ManagedChannel channel;
|
||||
|
||||
private static final class FakeInterLocalityPickerFactory implements PickerFactory {
|
||||
|
|
@ -182,8 +180,6 @@ public class XdsLbStateTest {
|
|||
@Override
|
||||
public StreamObserver<DiscoveryRequest> streamAggregatedResources(
|
||||
final StreamObserver<DiscoveryResponse> responseObserver) {
|
||||
responseWriter = responseObserver;
|
||||
|
||||
return new StreamObserver<DiscoveryRequest>() {
|
||||
|
||||
@Override
|
||||
|
|
@ -295,7 +291,7 @@ public class XdsLbStateTest {
|
|||
XdsLbState xdsLbState =
|
||||
new XdsLbState(BALANCER_NAME, null, null, helper, localityStore, adsStreamCallback);
|
||||
xdsLbState.handleResolvedAddressGroups(
|
||||
Collections.<EquivalentAddressGroup>emptyList(), Attributes.EMPTY);
|
||||
ImmutableList.<EquivalentAddressGroup>of(), Attributes.EMPTY);
|
||||
|
||||
assertThat(streamRecorder.firstValue().get().getTypeUrl())
|
||||
.isEqualTo("type.googleapis.com/envoy.api.v2.ClusterLoadAssignment");
|
||||
|
|
|
|||
|
|
@ -129,7 +129,7 @@ public class XdsLoadStatsStoreTest {
|
|||
|
||||
private static void assertUpstreamLocalityStatsListsEqual(List<UpstreamLocalityStats> expected,
|
||||
List<UpstreamLocalityStats> actual) {
|
||||
assertThat(actual.size()).isEqualTo(expected.size());
|
||||
assertThat(actual).hasSize(expected.size());
|
||||
Map<Locality, UpstreamLocalityStats> expectedLocalityStats = new HashMap<>();
|
||||
for (UpstreamLocalityStats stats : expected) {
|
||||
expectedLocalityStats.put(stats.getLocality(), stats);
|
||||
|
|
|
|||
Loading…
Reference in New Issue