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:
Eric Anderson 2018-07-04 07:32:57 -07:00 committed by GitHub
parent 02ad99e1f5
commit dd57b667cc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 5 deletions

View File

@ -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));

View File

@ -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");

View File

@ -634,6 +634,7 @@ class NettyClientHandler extends AbstractNettyHandler {
return true;
}
});
promise.setSuccess();
}
/**