Skip to content

Conversation

@thiagotnunes
Copy link
Contributor

The local connection checker should only check for unavailable exceptions when warning the user about the spanner emulator configuration. It should ignore all other kinds of errors.

The local connection checker should only check for unavailable exceptions when warning the user about the spanner emulator configuration. It should ignore all other kinds of errors.
@thiagotnunes thiagotnunes requested a review from a team as a code owner April 6, 2021 02:04
@product-auto-label product-auto-label bot added the api: spanner Issues related to the googleapis/java-spanner API. label Apr 6, 2021
@google-cla google-cla bot added the cla: yes This human has signed the Contributor License Agreement. label Apr 6, 2021
@codecov
Copy link

codecov bot commented Apr 6, 2021

Codecov Report

Merging #1036 (f8874d6) into master (70c5b80) will increase coverage by 0.01%.
The diff coverage is 100.00%.

Impacted file tree graph

@@ Coverage Diff @@ ## master #1036 +/- ## ============================================ + Coverage 85.20% 85.21% +0.01%  - Complexity 2642 2644 +2  ============================================ Files 155 155 Lines 14413 14412 -1 Branches 1348 1348 ============================================ + Hits 12280 12281 +1  + Misses 1564 1562 -2  Partials 569 569 
Impacted Files Coverage Δ Complexity Δ
...oud/spanner/connection/LocalConnectionChecker.java 81.57% <100.00%> (-0.48%) 6.00 <0.00> (ø)
...ain/java/com/google/cloud/spanner/SessionPool.java 88.93% <0.00%> (-0.39%) 72.00% <0.00%> (-1.00%)
...ud/spanner/SessionPoolAsyncTransactionManager.java 87.21% <0.00%> (+1.50%) 14.00% <0.00%> (+2.00%)
...m/google/cloud/spanner/connection/SpannerPool.java 89.47% <0.00%> (+1.57%) 33.00% <0.00%> (ø%)
.../google/cloud/spanner/AbstractLazyInitializer.java 100.00% <0.00%> (+7.14%) 5.00% <0.00%> (+1.00%)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 70c5b80...f8874d6. Read the comment docs.

@Test
public void testNoRunningEmulator() {
final String uri =
"cloudspanner://localhost:42424/projects/proj/instances/inst/databases/db?usePlainText=true";
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: It might be safer to use server.getPort() - 1 instead of 42424, as there is a 1/65000 chance that the port assigned to the mock server in this test happens to be 42424.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point, updated it.

@thiagotnunes thiagotnunes added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Apr 6, 2021
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Apr 6, 2021
@thiagotnunes thiagotnunes removed the cla: yes This human has signed the Contributor License Agreement. label Apr 6, 2021
@google-cla google-cla bot added the cla: yes This human has signed the Contributor License Agreement. label Apr 6, 2021
@thiagotnunes thiagotnunes merged commit 2d61bc4 into master Apr 6, 2021
@thiagotnunes thiagotnunes deleted the local-checker-ignores-exceptions branch April 6, 2021 23:02
rajatbhatta pushed a commit to rajatbhatta/java-spanner that referenced this pull request Nov 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: spanner Issues related to the googleapis/java-spanner API. cla: yes This human has signed the Contributor License Agreement.

3 participants