forked from apache/bookkeeper
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build: disable testNewEnsembleBookieWithOneEmptyRegion method in Test…
…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 <[email protected]>
- Loading branch information
Showing
3 changed files
with
50 additions
and
27 deletions.
There are no files selected for viewing
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
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
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