nk1506 commented on code in PR #10082:
URL: https://github.com/apache/iceberg/pull/10082#discussion_r1553430668


##########
hive-metastore/src/test/java/org/apache/iceberg/hive/TestHiveClientPool.java:
##########
@@ -116,6 +119,52 @@ public void 
testGetTablesFailsForNonReconnectableException() throws Exception {
         .hasMessage("Another meta exception");
   }
 
+  @Test
+  public void testExceptionMessages() {
+    // Test Wrapped MetaException with a message
+    try (MockedStatic<MetaStoreUtils> mockedStatic = 
Mockito.mockStatic(MetaStoreUtils.class)) {

Review Comment:
   Couldn't find a way to mock calling method 
   ```
   return GET_CLIENT.invoke(
               hiveConf, (HiveMetaHookLoader) tbl -> null, 
HiveMetaStoreClient.class.getName());
   ```
   and throw Exception. Had to trace and mock the class which is throwing 
error. 



-- 
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: issues-unsubscr...@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org
For additional commands, e-mail: issues-h...@iceberg.apache.org

Reply via email to