-
Notifications
You must be signed in to change notification settings - Fork 894
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
Disable two tests in BookKeeperTest on JDK 17+ due to UnsupportedOperationException #4347
Conversation
bcc5004
to
991d64a
Compare
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.
Thank you for picking this up!
Overall this LGTM but the change calls for addition of the "Compatibility Check" CI job with JDK 21 (LTS), otherwise I can't really look at the PR and tell that the fix works. Also this way we won't break this in the future.
See
bookkeeper/.github/workflows/bk-ci.yml
Lines 441 to 448 in 1ae4be0
matrix: | |
include: | |
- step_name: Compatibility Check Java8 | |
jdk_version: 8 | |
- step_name: Compatibility Check Java11 | |
jdk_version: 11 | |
- step_name: Compatibility Check Java17 | |
jdk_version: 17 |
and
Lines 54 to 56 in 1ae4be0
- Compatibility Check Java11 | |
- Compatibility Check Java17 | |
- Compatibility Check Java8 |
…ationException Signed-off-by: ZhangJian He <shoothzj@gmail.com>
991d64a
to
1b1e530
Compare
…ationException (apache#4347) ### Motivation JDK 17 and later throw `UnsupportedOperationException` for the `suspend` and `resume` methods, causing the `testConstructionZkDelay` and `testConstructionNotConnectedExplicitZk` tests to fail. See jdk21 daily build error: https://github.com/apache/bookkeeper/actions/runs/8962118072 ### Changes - Disabled the two affected test methods for JDK 17 and above using the `@EnabledForJreRange` annotation. - Transitioned to JUnit 5 annotations and assertions. ### Q&A Q: why there are so many line changes? like format change A: In junit5, the msg should be put in the latest param, related to some changes. Signed-off-by: ZhangJian He <shoothzj@gmail.com>
Motivation
JDK 17 and later throw
UnsupportedOperationException
for thesuspend
andresume
methods, causing thetestConstructionZkDelay
andtestConstructionNotConnectedExplicitZk
tests to fail.See jdk21 daily build error: https://github.com/apache/bookkeeper/actions/runs/8962118072
Changes
@EnabledForJreRange
annotation.Q&A
Q: why there are so many line changes? like format change
A: In junit5, the msg should be put in the latest param, related to some changes.