Skip to content
This repository was archived by the owner on May 8, 2026. It is now read-only.

Commit 81ee7cc

Browse files
committed
rename test, return different channel every time
Change-Id: Ifd84786b224109b73b6acb13fd08c3f892a48f12
1 parent c6adaae commit 81ee7cc

2 files changed

Lines changed: 3 additions & 9 deletions

File tree

google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/gaxx/grpc/BigtableTransportChannelProvider.java

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@
3535
public final class BigtableTransportChannelProvider implements TransportChannelProvider {
3636

3737
private final InstantiatingGrpcChannelProvider delegate;
38-
private TransportChannel transportChannel;
3938

4039
private BigtableTransportChannelProvider(
4140
InstantiatingGrpcChannelProvider instantiatingGrpcChannelProvider) {
@@ -104,11 +103,7 @@ public TransportChannelProvider withPoolSize(int size) {
104103

105104
@Override
106105
public TransportChannel getTransportChannel() throws IOException {
107-
TransportChannel result = transportChannel;
108-
if (transportChannel == null) {
109-
transportChannel = result = createTransportChannel();
110-
}
111-
return result;
106+
return createTransportChannel();
112107
}
113108

114109
private TransportChannel createTransportChannel() throws IOException {

google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/gaxx/utils/ChannelPoolCopyTest.java renamed to google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/gaxx/grpc/BigtableChannelPoolSettingsTest.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
1-
package com.google.cloud.bigtable.gaxx.utils;
1+
package com.google.cloud.bigtable.gaxx.grpc;
22

33
import static com.google.common.truth.Truth.assertThat;
44

55
import com.google.api.gax.grpc.ChannelPoolSettings;
6-
import com.google.cloud.bigtable.gaxx.grpc.BigtableChannelPoolSettings;
76
import com.google.common.collect.ImmutableSet;
87
import java.lang.reflect.Method;
98
import java.lang.reflect.Modifier;
@@ -18,7 +17,7 @@
1817
import org.mockito.junit.MockitoRule;
1918

2019
@RunWith(JUnit4.class)
21-
public class ChannelPoolCopyTest {
20+
public class BigtableChannelPoolSettingsTest {
2221
@Rule public MockitoRule mockitoRule = MockitoJUnit.rule();
2322

2423
@Test

0 commit comments

Comments
 (0)