-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Class cast exception in standard lock service #1878
Merged
nvoxland
merged 2 commits into
liquibase:4.4.x
from
jocmer-evooq:ClassCastException-in-StandardLockService
Jul 28, 2021
Merged
Class cast exception in standard lock service #1878
nvoxland
merged 2 commits into
liquibase:4.4.x
from
jocmer-evooq:ClassCastException-in-StandardLockService
Jul 28, 2021
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
nvoxland
approved these changes
Jun 3, 2021
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.
Changes look good. Thanks!
suryaaki2
approved these changes
Jun 4, 2021
➤ obovsunivskyi commented: need to verify my test steps with Nathan Voxland during desk check. |
➤ obovsunivskyi commented: Verified and works fine on build #4. Moving to RTM. |
This was referenced Aug 6, 2021
This was referenced Aug 9, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Environment
Liquibase Version:
4.3.1 -> 4.4.0
Liquibase Integration & Version: <Pick one: CLI, maven, gradle, spring boot, servlet, etc.>
At least spring boot, but all should be impacted
Liquibase Extension(s) & Version:
Database Vendor & Version:
MySQL with driver 8.0.23
Operating System Type & Version:
All
Pull Request Type
Description
The issue #1749 occurs when the locks are listed (after the lock times out). This fixes the cast issue. This PR also include a unit test to ensure it works with java.sql.Date and LocalDateTime.
To test it, it was not easy to mock the ExecutorService as the Scope does not allow to override a singleton. Thus I upgraded Mockito in order to use it's new mock static ability.
Steps To Reproduce
List the steps to reproduce the behavior.
Actual Behavior
A class cast exception is thrown (see #1749)
Expected/Desired Behavior
The locks are listed without any exception
Fast Track PR Acceptance Checklist:
<
!--- If you're unsure about any of these, just ask us in a comment. We're here to help|width=200,height=183!
-->
Fixes #1749
Test Requirements (Internal Liquibase QA)
Manual Test Setup
CLI
Verify list-locks does not throw a stack trace.
Verify list-locks returns the lock information to the console.
Verify when the update times out due to the lock, there is no stack trace thrown.
Spring Boot (Start the Application while database is locked)
Verify list-locks does not throw a stack trace.
Verify list-locks returns the lock information to the console.
Dev Handoff Notes (Internal Use)
Links
Testing
Dev Verification
Ran the list-locks command pre-fix to see it fail, and post-fix to see it pass.
(Did not save output at the time)
┆Issue is synchronized with this Jira Story by Unito