pvary commented on a change in pull request #634: HIVE-21732: Configurable 
injection of latency for LLAP task execution
URL: https://github.com/apache/hive/pull/634#discussion_r286414322
 
 

 ##########
 File path: 
llap-server/src/test/org/apache/hadoop/hive/llap/daemon/impl/TestLlapLoadGeneratorService.java
 ##########
 @@ -40,7 +44,32 @@ public void testLoadGenerator() throws 
InterruptedException, UnknownHostExceptio
 
     service.init(conf);
     service.start();
-    Thread.sleep(10000);
+    Thread.sleep(5000);
+    assertEquals("The number of threads is not correct",
+        Runtime.getRuntime().availableProcessors(), service.threads.length);
+    for(int i = 0; i < service.threads.length; i++) {
+      assertTrue("The thread [" + i + "] should be alive", 
service.threads[i].isAlive());
+    }
+    service.stop();
+    Thread.sleep(5000);
+    for(int i = 0; i < service.threads.length; i++) {
+      Thread.State state = service.threads[i].getState();
 
 Review comment:
   I think this is used. The service is stopped and it interrupts the load 
generating threads.
   After that we check if the threads are really stopped or not

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

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

Reply via email to