-
Notifications
You must be signed in to change notification settings - Fork 125
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
perf: remove custom transport executor #2366
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -923,14 +923,22 @@ public void testCustomAsyncExecutorProvider() { | |
@Test | ||
public void testDefaultNumChannelsWithGrpcGcpExtensionEnabled() { | ||
SpannerOptions options = | ||
SpannerOptions.newBuilder().setProjectId("test-project").enableGrpcGcpExtension().build(); | ||
SpannerOptions.newBuilder() | ||
.setProjectId("test-project") | ||
.setCredentials(NoCredentials.getInstance()) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This cleans up errors that are being logged during tests, clogging up the test log. |
||
.enableGrpcGcpExtension() | ||
.build(); | ||
|
||
assertEquals(SpannerOptions.GRPC_GCP_ENABLED_DEFAULT_CHANNELS, options.getNumChannels()); | ||
} | ||
|
||
@Test | ||
public void testDefaultNumChannelsWithGrpcGcpExtensionDisabled() { | ||
SpannerOptions options = SpannerOptions.newBuilder().setProjectId("test-project").build(); | ||
SpannerOptions options = | ||
SpannerOptions.newBuilder() | ||
.setProjectId("test-project") | ||
.setCredentials(NoCredentials.getInstance()) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This cleans up errors that are being logged during tests, clogging up the test log. |
||
.build(); | ||
|
||
assertEquals(SpannerOptions.DEFAULT_CHANNELS, options.getNumChannels()); | ||
} | ||
|
@@ -943,6 +951,7 @@ public void testNumChannelsWithGrpcGcpExtensionEnabled() { | |
SpannerOptions options1 = | ||
SpannerOptions.newBuilder() | ||
.setProjectId("test-project") | ||
.setCredentials(NoCredentials.getInstance()) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This cleans up errors that are being logged during tests, clogging up the test log. |
||
.setNumChannels(numChannels) | ||
.enableGrpcGcpExtension() | ||
.build(); | ||
|
@@ -954,6 +963,7 @@ public void testNumChannelsWithGrpcGcpExtensionEnabled() { | |
SpannerOptions options2 = | ||
SpannerOptions.newBuilder() | ||
.setProjectId("test-project") | ||
.setCredentials(NoCredentials.getInstance()) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This cleans up errors that are being logged during tests, clogging up the test log. |
||
.enableGrpcGcpExtension() | ||
.setNumChannels(numChannels) | ||
.build(); | ||
|
@@ -972,12 +982,19 @@ public void checkCreatedInstanceWhenGrpcGcpExtensionDisabled() { | |
Spanner spanner2 = options1.getService(); | ||
|
||
assertNotSame(spanner1, spanner2); | ||
|
||
spanner1.close(); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This cleans up errors that are being logged during tests, clogging up the test log. |
||
spanner2.close(); | ||
} | ||
|
||
@Test | ||
public void checkCreatedInstanceWhenGrpcGcpExtensionEnabled() { | ||
SpannerOptions options = | ||
SpannerOptions.newBuilder().setProjectId("test-project").enableGrpcGcpExtension().build(); | ||
SpannerOptions.newBuilder() | ||
.setProjectId("test-project") | ||
.setCredentials(NoCredentials.getInstance()) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This cleans up errors that are being logged during tests, clogging up the test log. |
||
.enableGrpcGcpExtension() | ||
.build(); | ||
SpannerOptions options1 = options.toBuilder().build(); | ||
assertEquals(true, options.isGrpcGcpExtensionEnabled()); | ||
assertEquals(options.isGrpcGcpExtensionEnabled(), options1.isGrpcGcpExtensionEnabled()); | ||
|
@@ -986,5 +1003,8 @@ public void checkCreatedInstanceWhenGrpcGcpExtensionEnabled() { | |
Spanner spanner2 = options1.getService(); | ||
|
||
assertNotSame(spanner1, spanner2); | ||
|
||
spanner1.close(); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This cleans up errors that are being logged during tests, clogging up the test log. |
||
spanner2.close(); | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This cleans up errors that are being logged during tests, clogging up the test log.