magnuma3 commented on code in PR #6513:
URL: https://github.com/apache/hive/pull/6513#discussion_r3331109551
##########
service/src/test/org/apache/hive/service/server/TestHiveServer2.java:
##########
@@ -98,4 +108,35 @@ 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);
+
+ long before = System.currentTimeMillis();
+ Thread.sleep(1000);
Review Comment:
@deniskuzZ thank you for review.
removed unnecessary test code
>why not just compare builder startcode with one set in root conf object?
setConf() copy `conf`, so checking root conf object doesn't distinguish
pre/post patch behavior.
I need to verify builder's internal copy contains startcode, which requires
reflection since Builder.conf is private.
If you have a better approach in mind, I'd appreciate your suggestion
--
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]