muthu90tech commented on code in PR #2100:
URL: https://github.com/apache/zookeeper/pull/2100#discussion_r1435898034


##########
zookeeper-server/src/test/java/org/apache/zookeeper/common/FileChangeWatcherTest.java:
##########
@@ -31,36 +31,25 @@
 import java.util.concurrent.atomic.AtomicInteger;
 import org.apache.commons.io.FileUtils;
 import org.apache.zookeeper.ZKTestCase;
-import org.apache.zookeeper.test.ClientBase;
-import org.junit.jupiter.api.AfterAll;
 import org.junit.jupiter.api.BeforeAll;
 import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.io.TempDir;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 public class FileChangeWatcherTest extends ZKTestCase {
 
-    private static File tempDir;
-    private static File tempFile;
+    @TempDir
+    static File tempDir;
+    static File tempFile;

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: notifications-unsubscr...@zookeeper.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to