mirror of https://github.com/grpc/grpc-java.git
Fix unused variables
Unused variables in tests were deleted. The unused variable in Netty was a future that needed completing; that was a bug.
This commit is contained in:
parent
02ad99e1f5
commit
dd57b667cc
|
@ -132,7 +132,6 @@ public class PickFirstLoadBalancerTest {
|
|||
@Test
|
||||
public void pickAfterResolvedAndChanged() throws Exception {
|
||||
SocketAddress socketAddr = new FakeSocketAddress("newserver");
|
||||
List<SocketAddress> newSocketAddresses = Lists.newArrayList(socketAddr);
|
||||
List<EquivalentAddressGroup> newServers =
|
||||
Lists.newArrayList(new EquivalentAddressGroup(socketAddr));
|
||||
|
||||
|
|
|
@ -19,7 +19,6 @@ package io.grpc.internal;
|
|||
import static com.google.common.truth.Truth.assertThat;
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
import io.grpc.EquivalentAddressGroup;
|
||||
import io.grpc.internal.DnsNameResolver.AddressResolver;
|
||||
import io.grpc.internal.JndiResourceResolverFactory.JndiResourceResolver;
|
||||
import io.grpc.internal.JndiResourceResolverFactory.JndiResourceResolver.SrvRecord;
|
||||
|
@ -58,16 +57,15 @@ public class JndiResourceResolverTest {
|
|||
}
|
||||
};
|
||||
JndiResourceResolver resolver = new JndiResourceResolver();
|
||||
List<EquivalentAddressGroup> results = null;
|
||||
try {
|
||||
results = resolver.resolveSrv(addressResolver, "localhost");
|
||||
resolver.resolveSrv(addressResolver, "localhost");
|
||||
} catch (javax.naming.CommunicationException e) {
|
||||
Assume.assumeNoException(e);
|
||||
} catch (javax.naming.NameNotFoundException e) {
|
||||
Assume.assumeNoException(e);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Test
|
||||
public void parseSrvRecord() {
|
||||
SrvRecord record = JndiResourceResolver.parseSrvRecord("0 0 1234 foo.bar.com");
|
||||
|
|
|
@ -634,6 +634,7 @@ class NettyClientHandler extends AbstractNettyHandler {
|
|||
return true;
|
||||
}
|
||||
});
|
||||
promise.setSuccess();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue