-
Notifications
You must be signed in to change notification settings - Fork 18
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 java 21 build #421
Fix java 21 build #421
Conversation
This reverts commit e9a0b15.
I've reverted that commit. An import wasn't required (as the class is in the same package) and the commit changed the class that was returned to the wrong one |
No I don't. |
Found it... PR incoming... Lock issue I think |
Ok, so the issue was that under Java 21 the controller switches to using virtual executors. Inside TestContainers we use a re-entrant lock and this all worked as it was effectively the same thread making all the requests
But with Java 21, we're seeing a new thread per request, and this is causing issues as re-entrant lock will not let these other thread in if it hasn't been unlocked
I think this is fixed by ensuring all LOCK/UNLOCK couplets are in a try...finally We could also force java 17 behavior by using But I think checking the locks are unlocked is the more correct behavior... |
Kudos, SonarCloud Quality Gate passed! |
Supersedes #415 to stop micronaut-build force pushing it all the time