magnuma3 commented on code in PR #6513:
URL: https://github.com/apache/hive/pull/6513#discussion_r3332148460


##########
service/src/test/org/apache/hive/service/server/TestHiveServer2.java:
##########
@@ -98,4 +108,31 @@ public void 
testMaybeStartCompactorThreadsMultipleCustomPoolsAndDefaultPool() {
     assertEquals(Integer.valueOf(5), startedWorkers.get("pool3"));
     assertEquals(Integer.valueOf(3), 
startedWorkers.get(Constants.COMPACTION_DEFAULT_POOL));
   }
+
+  @Test
+  public void testCreateHttpServerBuilderStampsStartcodeBeforeConfIsCopied() 
throws Exception {
+    HiveConf conf = new HiveConf();
+
+    CLIService cli = mock(CLIService.class);
+    SessionManager sessionManager = mock(SessionManager.class);
+    when(cli.getSessionManager()).thenReturn(sessionManager);
+
+    HttpServer.Builder builder = HiveServer2.createHttpServerBuilder(
+        "localhost", 0, "test", "/", conf, cli, null);
+    Thread.sleep(1000);

Review Comment:
   @deniskuzZ 
   
   > isn't it enough to check if builder conf has "startcode"?
   
   Good point. you're right.
   I drop sleep and simplify the assertion.
   
   
   



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