Github user ilooner commented on a diff in the pull request:

    https://github.com/apache/drill/pull/984#discussion_r147261203
  
    --- Diff: 
exec/java-exec/src/test/java/org/apache/drill/test/ClusterFixture.java ---
    @@ -226,43 +217,16 @@ private void createConfig(FixtureBuilder builder) 
throws Exception {
     
           serviceSet = null;
           usesZk = true;
    -      isLocal = false;
         } else {
           // Embedded Drillbit.
     
           serviceSet = RemoteServiceSet.getLocalServiceSet();
    -      isLocal = true;
         }
       }
     
    -  private void startDrillbits(FixtureBuilder builder) throws Exception {
    -//    // Ensure that Drill uses the log directory determined here rather 
than
    -//    // it's hard-coded defaults. WIP: seems to be needed some times but
    -//    // not others.
    -//
    -//    String logDir = null;
    -//    if (builder.tempDir != null) {
    -//      logDir = builder.tempDir.getAbsolutePath();
    -//    }
    -//    if (logDir == null) {
    -//      logDir = config.getString(ExecConstants.DRILL_TMP_DIR);
    -//      if (logDir != null) {
    -//        logDir += "/drill/log";
    -//      }
    -//    }
    -//    if (logDir == null) {
    -//      logDir = "/tmp/drill";
    -//    }
    -//    new File(logDir).mkdirs();
    -//    System.setProperty("drill.log-dir", logDir);
    -
    -    dfsTestTempDir = makeTempDir("dfs-test");
    -
    -    // Clean up any files that may have been left from the
    -    // last run.
    -
    -    preserveLocalFiles = builder.preserveLocalFiles;
    -    removeLocalFiles();
    +  private void startDrillbits() throws Exception {
    +    dfsTestTempDir = new File(getRootDir(), "dfs-test");
    +    dfsTestTempDir.mkdirs();
    --- End diff --
    
    This is possible through the BaseDirTestWatcher. It is configured through 
the BaseDireTestWatcher's constructor. If you pass it false it will not delete 
your directories at the end of each test.


---

Reply via email to