Skip to content

Commit

Permalink
Fix test case
Browse files Browse the repository at this point in the history
  • Loading branch information
mutianf committed Oct 18, 2020
1 parent 45673db commit c89aa60
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 12 deletions.
Expand Up @@ -807,8 +807,6 @@ public EnhancedBigtableStubSettings build() {
Preconditions.checkArgument(
getTransportChannelProvider() instanceof InstantiatingGrpcChannelProvider,
"refreshingChannel only works with InstantiatingGrpcChannelProviders");
Preconditions.checkArgument(
appProfileId != null, "refreshingChannel only works when appProfileId is set");
InstantiatingGrpcChannelProvider.Builder channelProviderBuilder =
((InstantiatingGrpcChannelProvider) getTransportChannelProvider()).toBuilder();
try {
Expand Down
Expand Up @@ -47,7 +47,6 @@
import java.util.List;
import java.util.concurrent.BlockingQueue;
import java.util.concurrent.LinkedBlockingDeque;
import java.util.concurrent.atomic.AtomicInteger;
import org.junit.After;
import org.junit.Before;
import org.junit.Rule;
Expand Down Expand Up @@ -80,7 +79,6 @@ public class BigtableDataClientFactoryTest {
private int port;

private final BlockingQueue<Attributes> attributes = new LinkedBlockingDeque<>();
private final AtomicInteger terminationCount = new AtomicInteger();

@Before
public void setUp() throws IOException {
Expand All @@ -100,12 +98,6 @@ public Attributes transportReady(Attributes transportAttrs) {
attributes.add(transportAttrs);
return super.transportReady(transportAttrs);
}

@Override
public void transportTerminated(Attributes transportAttrs) {
terminationCount.incrementAndGet();
super.transportTerminated(transportAttrs);
}
})
.build();

Expand Down Expand Up @@ -279,8 +271,6 @@ public void testCreateWithRefreshingChannel() throws Exception {
}
}
assertThat(service.readRowsRequests).containsExactly(expectedRequests.toArray());
factory.close();
assertThat(terminationCount.get()).isEqualTo(poolSize);
}

private static class FakeBigtableService extends BigtableGrpc.BigtableImplBase {
Expand Down
Expand Up @@ -25,6 +25,7 @@
import com.google.api.gax.rpc.StatusCode.Code;
import com.google.api.gax.rpc.UnaryCallSettings;
import com.google.api.gax.rpc.WatchdogProvider;
import com.google.auth.Credentials;
import com.google.cloud.bigtable.data.v2.models.ConditionalRowMutation;
import com.google.cloud.bigtable.data.v2.models.KeyOffset;
import com.google.cloud.bigtable.data.v2.models.Query;
Expand Down

0 comments on commit c89aa60

Please sign in to comment.