You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@accumulo.apache.org by GitBox <gi...@apache.org> on 2022/02/15 17:13:02 UTC

[GitHub] [accumulo] DomGarguilo commented on a change in pull request #2496: Modify ZooKeeperTestingServer to use Junit TemporaryFolder

DomGarguilo commented on a change in pull request #2496:
URL: https://github.com/apache/accumulo/pull/2496#discussion_r807096207



##########
File path: test/src/main/java/org/apache/accumulo/test/zookeeper/ZooKeeperTestingServer.java
##########
@@ -47,16 +46,14 @@
    * Instantiate a running zookeeper server - this call will block until the server is ready for
    * client connections. It will try three times, with a 5 second pause to connect.
    */
-  public ZooKeeperTestingServer() {
-    this(PortUtils.getRandomFreePort());
+  public ZooKeeperTestingServer(File tmpDir) {
+    this(tmpDir, PortUtils.getRandomFreePort());
   }
 
-  private ZooKeeperTestingServer(int port) {
+  private ZooKeeperTestingServer(File tmpDir, int port) {
 

Review comment:
       I wonder if adding a check here that tmpDir is indeed a directory would be good. Not sure if its needed but we could add something like:
   ```
   Preconditions.checkArgument(tmpDir.isDirectory());
   ```
   or
   ```
   Preconditions.checkArgument(tmpDir.isDirectory() || tmpDir.mkdir());
   ```




-- 
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-unsubscribe@accumulo.apache.org

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