ctubbsii commented on code in PR #2100:
URL: https://github.com/apache/zookeeper/pull/2100#discussion_r1462571768
##########
zookeeper-server/src/test/java/org/apache/zookeeper/server/quorum/auth/QuorumAuthTestBase.java:
##########
@@ -44,11 +44,11 @@ public class QuorumAuthTestBase extends ZKTestCase {
protected static final Logger LOG =
LoggerFactory.getLogger(QuorumAuthTestBase.class);
protected List<MainThread> mt = new ArrayList<>();
+ @TempDir
protected static File jaasConfigDir;
Review Comment:
Should avoid static initializer blocks in general... they make for
hard-to-test code, not to mention the potential bootstrapping issue mentioned
here. Should use JUnit `@BeforeAll` annotation to initialize static fields in
test case classes, if possible, to make sure JUnit does the right thing
automatically.
--
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]