kokila-19 commented on code in PR #6338:
URL: https://github.com/apache/hive/pull/6338#discussion_r2882956957


##########
ql/src/test/org/apache/hadoop/hive/ql/exec/tez/TestTezSessionState.java:
##########
@@ -90,4 +91,42 @@ void openInternalUnsafe(boolean isAsync, 
SessionState.LogHelper console) throws
     Assert.assertFalse("Scratch dir is not supposed to exist after cleanup: " 
+ scratchDirPath.get(),
         Files.exists(Paths.get(scratchDirPath.get())));
   }
+
+  /**
+   * Tests whether commonLocalResources is populated with app jar and 
localized resources when opening
+   * a Tez session.
+   */
+  @Test
+  public void testCommonLocalResourcesPopulatedOnSessionOpen() throws 
Exception {
+    Path jarPath = Files.createTempFile("test-jar", ".jar");
+    Files.write(jarPath, "testCommonLocalResourcesPopulated".getBytes(), 
StandardOpenOption.APPEND);
+
+    HiveConf hiveConf = new HiveConfForTest(getClass());
+    hiveConf.set("hive.security.authorization.manager",
+        
"org.apache.hadoop.hive.ql.security.authorization.plugin.sqlstd.SQLStdConfOnlyAuthorizerFactory");
+    SessionState.start(hiveConf);

Review Comment:
   Addressed the issue and also added common method to reuse for all test cases.



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