diff --git a/core/src/test/java/io/grpc/PickFirstLoadBalancerTest.java b/core/src/test/java/io/grpc/PickFirstLoadBalancerTest.java index 0f9cd106c3..5b7dbbf20e 100644 --- a/core/src/test/java/io/grpc/PickFirstLoadBalancerTest.java +++ b/core/src/test/java/io/grpc/PickFirstLoadBalancerTest.java @@ -132,7 +132,6 @@ public class PickFirstLoadBalancerTest { @Test public void pickAfterResolvedAndChanged() throws Exception { SocketAddress socketAddr = new FakeSocketAddress("newserver"); - List newSocketAddresses = Lists.newArrayList(socketAddr); List newServers = Lists.newArrayList(new EquivalentAddressGroup(socketAddr)); diff --git a/core/src/test/java/io/grpc/internal/JndiResourceResolverTest.java b/core/src/test/java/io/grpc/internal/JndiResourceResolverTest.java index 80f5a7b5f3..51ae7c5d2c 100644 --- a/core/src/test/java/io/grpc/internal/JndiResourceResolverTest.java +++ b/core/src/test/java/io/grpc/internal/JndiResourceResolverTest.java @@ -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 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"); diff --git a/netty/src/main/java/io/grpc/netty/NettyClientHandler.java b/netty/src/main/java/io/grpc/netty/NettyClientHandler.java index b562e6237b..07ce8e94c6 100644 --- a/netty/src/main/java/io/grpc/netty/NettyClientHandler.java +++ b/netty/src/main/java/io/grpc/netty/NettyClientHandler.java @@ -634,6 +634,7 @@ class NettyClientHandler extends AbstractNettyHandler { return true; } }); + promise.setSuccess(); } /**