-
Notifications
You must be signed in to change notification settings - Fork 1.1k
spanner-jdbc: Allow empty or invalid env credentials #6092
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
spanner-jdbc: Allow empty or invalid env credentials #6092
Conversation
| } catch (Exception e) { | ||
| // Ignore the error if the user did not set a credentials URL. | ||
| // The error is then caused by an invalid environment configuration | ||
| // and should not be thrown here. |
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.
can we add a test that asserts the correct exception is thrown?
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.
I've added a couple of test cases to cover this.
On environments with no or invalid application credentials, the JDBC driver would throw an IllegalArgumentException when a connection was being created without an explicit credentials URL included in the connection string.
5415654 to
3f019eb
Compare
Codecov Report
@@ Coverage Diff @@
## master #6092 +/- ##
============================================
+ Coverage 47.38% 47.38% +<.01%
Complexity 27180 27180
============================================
Files 2523 2523
Lines 274580 274589 +9
Branches 31380 31381 +1
============================================
+ Hits 130118 130126 +8
Misses 134852 134852
- Partials 9610 9611 +1
Continue to review full report at Codecov.
|
|
Abandoned. This should be fixed in the test cases rather than deferring the exception to a later moment. |
On environments with no or invalid application credentials, the JDBC driver would throw an
IllegalArgumentExceptionwhen a connection was being created without an explicit credentials URL included in the connection string.Updates #6075