Skip to content
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

docs: improve error messages #1011

Merged
merged 4 commits into from Mar 28, 2021
Merged

docs: improve error messages #1011

merged 4 commits into from Mar 28, 2021

Conversation

olavloite
Copy link
Contributor

@olavloite olavloite commented Mar 23, 2021

Improve error messages when something is wrong in the connection string.

Fixes googleapis/java-spanner-jdbc#399

Improve error messages when something is wrong in the connection string.

Fixes #java-spanner-jdbc/399
@olavloite olavloite requested a review from thiagotnunes Mar 23, 2021
@olavloite olavloite requested a review from as a code owner Mar 23, 2021
@google-cla google-cla bot added the cla: yes label Mar 23, 2021
@product-auto-label product-auto-label bot added the api: spanner label Mar 23, 2021
@olavloite
Copy link
Contributor Author

@olavloite olavloite commented Mar 23, 2021

@codecov
Copy link

@codecov codecov bot commented Mar 23, 2021

Codecov Report

Merging #1011 (47c3b99) into master (9132c21) will decrease coverage by 0.08%.
The diff coverage is 71.79%.

Current head 47c3b99 differs from pull request most recent head 3815456. Consider uploading reports for the commit 3815456 to get more accurate results
Impacted file tree graph

@@             Coverage Diff              @@
##             master    #1011      +/-   ##
============================================
- Coverage     85.14%   85.06%   -0.09%     
- Complexity     2622     2623       +1     
============================================
  Files           154      154              
  Lines         14329    14362      +33     
  Branches       1334     1340       +6     
============================================
+ Hits          12201    12217      +16     
- Misses         1565     1576      +11     
- Partials        563      569       +6     
Impacted Files Coverage Δ Complexity Δ
...e/cloud/spanner/connection/CredentialsService.java 83.33% <60.00%> (-6.67%) 8.00 <0.00> (ø)
...le/cloud/spanner/connection/ConnectionOptions.java 88.80% <73.52%> (-1.73%) 94.00 <5.00> (+5.00) ⬇️
.../google/cloud/spanner/AbstractLazyInitializer.java 92.85% <0.00%> (-7.15%) 4.00% <0.00%> (-1.00%)
...a/com/google/cloud/spanner/SpannerRetryHelper.java 80.95% <0.00%> (-3.67%) 3.00% <0.00%> (ø%)
...ud/spanner/SessionPoolAsyncTransactionManager.java 85.71% <0.00%> (-1.51%) 12.00% <0.00%> (-2.00%)
...m/google/cloud/spanner/connection/SpannerPool.java 87.36% <0.00%> (-0.53%) 33.00% <0.00%> (ø%)
...a/com/google/cloud/spanner/AsyncResultSetImpl.java 91.89% <0.00%> (-0.39%) 32.00% <0.00%> (ø%)
...ain/java/com/google/cloud/spanner/SessionPool.java 88.93% <0.00%> (-0.20%) 72.00% <0.00%> (ø%)
...a/com/google/cloud/spanner/SessionPoolOptions.java 69.53% <0.00%> (ø) 17.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 9132c21...3815456. Read the comment docs.

* Executes a quick check to see if this connection can actually connect to a local emulator host
* or other (mock) test server, if the options point to localhost instead of Cloud Spanner.
*/
private void checkLocalConnection() {
Copy link
Contributor

@thiagotnunes thiagotnunes Mar 24, 2021

Choose a reason for hiding this comment

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

Could we extract a class for this? I feel this class is very big already.

Copy link
Contributor Author

@olavloite olavloite Mar 26, 2021

Choose a reason for hiding this comment

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

Good point, I've moved it to a separate class.

@olavloite olavloite added the kokoro:force-run label Mar 26, 2021
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run label Mar 26, 2021
@olavloite olavloite requested a review from thiagotnunes Mar 26, 2021
@thiagotnunes thiagotnunes merged commit 7dacfdc into master Mar 28, 2021
15 of 16 checks passed
@thiagotnunes thiagotnunes deleted the error-msg-connection branch Mar 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: spanner cla: yes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants