-
Notifications
You must be signed in to change notification settings - Fork 963
build: disable testNewEnsembleBookieWithOneEmptyRegion method in TestRegionAwareEnsemblePlacementPolicy beyond jdk11 #4323
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
Merged
Conversation
This file contains hidden or 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
867ea06 to
f7e2a09
Compare
…RegionAwareEnsemblePlacementPolicy beyond jdk11 Signed-off-by: ZhangJian He <shoothzj@gmail.com>
f7e2a09 to
815e4f6
Compare
5735380 to
a1886d5
Compare
Member
Author
|
@dlg99 @eolivelli @hangc0276 @merlimat @nicoloboschi @StevenLuMT @wenbingshen @zhaijack PTAL |
StevenLuMT
approved these changes
May 5, 2024
Member
StevenLuMT
left a comment
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
zhiheng123
pushed a commit
to zhiheng123/bookkeeper
that referenced
this pull request
Jun 5, 2024
…RegionAwareEnsemblePlacementPolicy beyond jdk11 (apache#4323) ### Motivation In JDK21, it's is no way to change private static final variable currently, before figure out how to replace, disable it first ``` Field logField = repp.getClass().getDeclaredField("LOG"); Logger mockLogger = mock(Logger.class); Field modifiers = Field.class.getDeclaredField("modifiers"); modifiers.setAccessible(true); modifiers.setInt(logField, logField.getModifiers() & ~Modifier.FINAL); ``` See also https://issues.apache.org/jira/browse/CASSANDRA-18181 ### Changes 1. Added junit5 annotation `@EnabledForJreRange(max = JRE.JAVA_17)`(It's modern and better than junit4) to tests that use `suspend` and `resume`, effectively disabling these tests on JDK versions higher than 17 where these methods are not supported. 2. BookieZKExpireTest should be annotated as junit5 test. 3. Make `BookKeeperClusterTestCase` compatible to junit5. Signed-off-by: ZhangJian He <shoothzj@gmail.com>
zhiheng123
pushed a commit
to zhiheng123/bookkeeper
that referenced
this pull request
Jun 7, 2024
…RegionAwareEnsemblePlacementPolicy beyond jdk11 (apache#4323) ### Motivation In JDK21, it's is no way to change private static final variable currently, before figure out how to replace, disable it first ``` Field logField = repp.getClass().getDeclaredField("LOG"); Logger mockLogger = mock(Logger.class); Field modifiers = Field.class.getDeclaredField("modifiers"); modifiers.setAccessible(true); modifiers.setInt(logField, logField.getModifiers() & ~Modifier.FINAL); ``` See also https://issues.apache.org/jira/browse/CASSANDRA-18181 ### Changes 1. Added junit5 annotation `@EnabledForJreRange(max = JRE.JAVA_17)`(It's modern and better than junit4) to tests that use `suspend` and `resume`, effectively disabling these tests on JDK versions higher than 17 where these methods are not supported. 2. BookieZKExpireTest should be annotated as junit5 test. 3. Make `BookKeeperClusterTestCase` compatible to junit5. Signed-off-by: ZhangJian He <shoothzj@gmail.com>
zhiheng123
pushed a commit
to zhiheng123/bookkeeper
that referenced
this pull request
Jun 7, 2024
…RegionAwareEnsemblePlacementPolicy beyond jdk11 (apache#4323) ### Motivation In JDK21, it's is no way to change private static final variable currently, before figure out how to replace, disable it first ``` Field logField = repp.getClass().getDeclaredField("LOG"); Logger mockLogger = mock(Logger.class); Field modifiers = Field.class.getDeclaredField("modifiers"); modifiers.setAccessible(true); modifiers.setInt(logField, logField.getModifiers() & ~Modifier.FINAL); ``` See also https://issues.apache.org/jira/browse/CASSANDRA-18181 ### Changes 1. Added junit5 annotation `@EnabledForJreRange(max = JRE.JAVA_17)`(It's modern and better than junit4) to tests that use `suspend` and `resume`, effectively disabling these tests on JDK versions higher than 17 where these methods are not supported. 2. BookieZKExpireTest should be annotated as junit5 test. 3. Make `BookKeeperClusterTestCase` compatible to junit5. Signed-off-by: ZhangJian He <shoothzj@gmail.com>
Ghatage
pushed a commit
to sijie/bookkeeper
that referenced
this pull request
Jul 12, 2024
…RegionAwareEnsemblePlacementPolicy beyond jdk11 (apache#4323) ### Motivation In JDK21, it's is no way to change private static final variable currently, before figure out how to replace, disable it first ``` Field logField = repp.getClass().getDeclaredField("LOG"); Logger mockLogger = mock(Logger.class); Field modifiers = Field.class.getDeclaredField("modifiers"); modifiers.setAccessible(true); modifiers.setInt(logField, logField.getModifiers() & ~Modifier.FINAL); ``` See also https://issues.apache.org/jira/browse/CASSANDRA-18181 ### Changes 1. Added junit5 annotation `@EnabledForJreRange(max = JRE.JAVA_17)`(It's modern and better than junit4) to tests that use `suspend` and `resume`, effectively disabling these tests on JDK versions higher than 17 where these methods are not supported. 2. BookieZKExpireTest should be annotated as junit5 test. 3. Make `BookKeeperClusterTestCase` compatible to junit5. Signed-off-by: ZhangJian He <shoothzj@gmail.com>
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.
Motivation
In JDK21, it's is no way to change private static final variable currently, before figure out how to replace, disable it first
See also https://issues.apache.org/jira/browse/CASSANDRA-18181
Changes
@EnabledForJreRange(max = JRE.JAVA_17)(It's modern and better than junit4) to tests that usesuspendandresume, effectively disabling these tests on JDK versions higher than 17 where these methods are not supported.BookKeeperClusterTestCasecompatible to junit5.