Skip to content

Commit 957b147

Browse files
committed
fix test
1 parent 79c0c7e commit 957b147

File tree

2 files changed

+8
-29
lines changed

2 files changed

+8
-29
lines changed

google-cloud-spanner/src/main/java/com/google/cloud/spanner/SpannerOptions.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1264,8 +1264,8 @@ public Builder setRetrySettings(RetrySettings retrySettings) {
12641264
* builder
12651265
* .getSpannerStubSettingsBuilder()
12661266
* .applyToAllUnaryMethods(
1267-
* new ApiFunction<UnaryCallSettings.Builder<?, ?>, Void>() {
1268-
* public Void apply(Builder<?, ?> input) {
1267+
* new ApiFunction&lt;UnaryCallSettings.Builder&lt;?, ?&gt;, Void&gt;() {
1268+
* public Void apply(Builder&lt;?, ?&gt; input) {
12691269
* input.setRetrySettings(retrySettings);
12701270
* return null;
12711271
* }
@@ -1292,8 +1292,8 @@ public SpannerStubSettings.Builder getSpannerStubSettingsBuilder() {
12921292
* builder
12931293
* .getInstanceAdminStubSettingsBuilder()
12941294
* .applyToAllUnaryMethods(
1295-
* new ApiFunction<UnaryCallSettings.Builder<?, ?>, Void>() {
1296-
* public Void apply(Builder<?, ?> input) {
1295+
* new ApiFunction&lt;UnaryCallSettings.Builder&lt;?, ?&gt;, Void&gt;() {
1296+
* public Void apply(Builder&lt;?, ?&gt; input) {
12971297
* input.setRetrySettings(retrySettings);
12981298
* return null;
12991299
* }
@@ -1320,8 +1320,8 @@ public InstanceAdminStubSettings.Builder getInstanceAdminStubSettingsBuilder() {
13201320
* builder
13211321
* .getDatabaseAdminStubSettingsBuilder()
13221322
* .applyToAllUnaryMethods(
1323-
* new ApiFunction<UnaryCallSettings.Builder<?, ?>, Void>() {
1324-
* public Void apply(Builder<?, ?> input) {
1323+
* new ApiFunction&lt;UnaryCallSettings.Builder&lt;?, ?&gt;, Void&gt;() {
1324+
* public Void apply(Builder&lt;?, ?&gt; input) {
13251325
* input.setRetrySettings(retrySettings);
13261326
* return null;
13271327
* }

google-cloud-spanner/src/test/java/com/google/cloud/spanner/ChannelUsageTest.java

Lines changed: 2 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -70,13 +70,9 @@ public class ChannelUsageTest {
7070
@Parameter(0)
7171
public int numChannels;
7272

73-
@Parameter(1)
74-
public boolean enableGcpPool;
75-
76-
@Parameters(name = "num channels = {0}, enable GCP pool = {1}")
73+
@Parameters(name = "num channels = {0}")
7774
public static Collection<Object[]> data() {
78-
return Arrays.asList(
79-
new Object[][] {{1, true}, {1, false}, {2, true}, {2, false}, {4, true}, {4, false}});
75+
return Arrays.asList(new Object[][] {{1}, {2}, {4}});
8076
}
8177

8278
private static final Statement SELECT1 = Statement.of("SELECT 1 AS COL1");
@@ -208,27 +204,10 @@ private SpannerOptions createSpannerOptions() {
208204
.build())
209205
.setHost("http://" + endpoint)
210206
.setCredentials(NoCredentials.getInstance());
211-
if (enableGcpPool) {
212-
builder.enableGrpcGcpExtension();
213-
}
214207

215208
return builder.build();
216209
}
217210

218-
@Test
219-
public void testCreatesNumChannels() {
220-
try (Spanner spanner = createSpannerOptions().getService()) {
221-
assumeFalse(
222-
"GRPC-GCP is currently not supported with multiplexed sessions",
223-
isMultiplexedSessionsEnabled(spanner) && enableGcpPool);
224-
DatabaseClient client = spanner.getDatabaseClient(DatabaseId.of("p", "i", "d"));
225-
try (ResultSet resultSet = client.singleUse().executeQuery(SELECT1)) {
226-
while (resultSet.next()) {}
227-
}
228-
}
229-
assertEquals(numChannels, batchCreateSessionLocalIps.size());
230-
}
231-
232211
@Test
233212
public void testUsesAllChannels() throws InterruptedException {
234213
final int multiplier = 2;

0 commit comments

Comments
 (0)