abstractdog commented on code in PR #5054:
URL: https://github.com/apache/hive/pull/5054#discussion_r1501360812


##########
llap-server/src/test/org/apache/hadoop/hive/llap/daemon/impl/TestLlapDaemon.java:
##########
@@ -83,26 +95,67 @@ public void tearDown() {
     for (String mSource : METRICS_SOURCES) {
       ms.unregisterSource(mSource);
     }
-    daemon.shutdown();
+    if (daemon != null) {
+      daemon.shutdown();
+    }
   }
 
   @Test(expected = IllegalArgumentException.class)
   public void testEnforceProperNumberOfIOThreads() throws IOException {
-    Configuration thisHiveConf = new HiveConf();
-    HiveConf.setVar(thisHiveConf, HiveConf.ConfVars.LLAP_DAEMON_SERVICE_HOSTS, 
"@llap");
-    HiveConf.setIntVar(thisHiveConf, 
HiveConf.ConfVars.LLAP_DAEMON_NUM_EXECUTORS, 4);
-    HiveConf.setIntVar(thisHiveConf, 
HiveConf.ConfVars.LLAP_IO_THREADPOOL_SIZE, 3);
-
-    LlapDaemon thisDaemon = new LlapDaemon(thisHiveConf, 1, 
LlapDaemon.getTotalHeapSize(), false, false,
-            -1, new String[1], 0, false, 0,0, 0, -1, "TestLlapDaemon");
-    thisDaemon.close();
+    HiveConf.setIntVar(hiveConf, HiveConf.ConfVars.LLAP_IO_THREADPOOL_SIZE, 3);
+
+    daemon = new LlapDaemon(hiveConf, 4, LlapDaemon.getTotalHeapSize(), true, 
false,
+            -1, new String[1], 0, false, 0,0, 0, defaultWebPort, 
"TestLlapDaemon");
+  }
+
+   @Test
+  public void testLocalDirCleaner() throws IOException, InterruptedException {
+    HiveConf.setTimeVar(hiveConf, 
HiveConf.ConfVars.LLAP_LOCAL_DIR_CLEANER_CLEANUP_INTERVAL, 2, TimeUnit.SECONDS);
+    HiveConf.setTimeVar(hiveConf, 
HiveConf.ConfVars.LLAP_LOCAL_DIR_CLEANER_FILE_MODIFY_TIME_THRESHOLD, 1,
+        TimeUnit.SECONDS);

Review Comment:
   it's SECONDS: we set the exact amount of time that we use here in the test



-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to