shoothzj opened a new pull request, #4323:
URL: https://github.com/apache/bookkeeper/pull/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.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]