-
Notifications
You must be signed in to change notification settings - Fork 123
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
fix: Noop in case there is no change in autocommit value for setAutocommit() method #2662
Conversation
google-cloud-spanner/src/main/java/com/google/cloud/spanner/connection/ConnectionImpl.java
Show resolved
Hide resolved
google-cloud-spanner/src/test/java/com/google/cloud/spanner/connection/ConnectionImplTest.java
Show resolved
Hide resolved
A couple of general comments on the pull request itself:
|
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.
LGTM with a couple of minor nits.
subject.execute(Statement.of("begin transaction")); | ||
|
||
subject.setAutocommit(false); | ||
fail("Cannot set autocommit while in a temporary transaction"); |
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.
nit: use assertThrows(..)
for this.
I know that there are examples in this test class that use this setup with a try-fail block. Those are however left-overs from when this library had to support Java 7, and we did not have support for lambda expressions.
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.
Done
google-cloud-spanner/src/test/java/com/google/cloud/spanner/connection/ConnectionImplTest.java
Show resolved
Hide resolved
🤖 I have created a release *beep* *boop* --- ## [6.50.1](https://togithub.com/googleapis/java-spanner/compare/v6.50.0...v6.50.1) (2023-10-11) ### Bug Fixes * Noop in case there is no change in autocommit value for setAutocommit() method ([#2662](https://togithub.com/googleapis/java-spanner/issues/2662)) ([9f51b64](https://togithub.com/googleapis/java-spanner/commit/9f51b6445f064439379af752372a3490a2fd5087)) ### Dependencies * Update dependency com.google.cloud:google-cloud-shared-dependencies to v3.17.0 ([#2660](https://togithub.com/googleapis/java-spanner/issues/2660)) ([96b9dd6](https://togithub.com/googleapis/java-spanner/commit/96b9dd6b6a0ee7b1a0a1cc58a8880a10799665e6)) * Update dependency commons-io:commons-io to v2.14.0 ([#2649](https://togithub.com/googleapis/java-spanner/issues/2649)) ([fa1b73c](https://togithub.com/googleapis/java-spanner/commit/fa1b73c1bf4700be5e8865211817e2bc7cc77119)) --- This PR was generated with [Release Please](https://togithub.com/googleapis/release-please). See [documentation](https://togithub.com/googleapis/release-please#release-please).
Noop in case there is no change in autocommit value for setAutocommit() method