muthu90tech commented on code in PR #2100:
URL: https://github.com/apache/zookeeper/pull/2100#discussion_r1435897943
##########
zookeeper-server/src/test/java/org/apache/zookeeper/client/ZKClientConfigTest.java:
##########
@@ -38,20 +38,14 @@
import java.util.Properties;
import org.apache.zookeeper.common.ZKConfig;
import org.apache.zookeeper.server.quorum.QuorumPeerConfig.ConfigException;
-import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.Timeout;
+import org.junit.jupiter.api.io.TempDir;
public class ZKClientConfigTest {
- private static final File testData = new
File(System.getProperty("test.data.dir", "src/test/resources/data"));
-
- @BeforeAll
- public static void init() {
- if (!testData.exists()) {
- testData.mkdirs();
- }
- }
+ @TempDir
+ static File testDataDir;
Review Comment:
Thanks for the comments, But Junit does not let me make that private. Pls see
```
org.junit.jupiter.api.extension.ExtensionConfigurationException: @TempDir
field [private static java.io.File
org.apache.zookeeper.client.ZKClientConfigTest.testDataDir] must not be private.
```
--
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]