lurnagao-dahua commented on code in PR #10069:
URL: https://github.com/apache/iceberg/pull/10069#discussion_r1549380381


##########
hive-metastore/src/test/java/org/apache/iceberg/hive/TestHiveCommits.java:
##########
@@ -397,6 +397,30 @@ public void testLockExceptionUnknownSuccessCommit() throws 
TException, Interrupt
         .isTrue();
   }
 
+  @Test
+  public void testCommitExceptionWithoutMessage() throws TException, 
InterruptedException {

Review Comment:
   > @Test
   >   public void testCommitExceptionWithoutMessage() throws TException, 
InterruptedException {
   >     Table table = catalog.loadTable(TABLE_IDENTIFIER);
   >     HiveTableOperations ops = (HiveTableOperations) ((HasTableOperations) 
table).operations();
   > 
   >     TableMetadata metadataV1 = ops.current();
   >     table.updateSchema().addColumn("n", Types.IntegerType.get()).commit();
   > 
   >     ops.refresh();
   > 
   >     HiveTableOperations spyOps = spy(ops);
   >     doThrow(new RuntimeException()).when(spyOps).persistTable(any(), 
anyBoolean(), any());
   > 
   >     assertThatThrownBy(() -> spyOps.commit(ops.current(), metadataV1))
   >         .isInstanceOf(CommitStateUnknownException.class)
   >         .hasMessageStartingWith("null\nCannot determine whether the commit 
was successful or not");
   >   }
   
   Thank you very much, I have simplified unit test.



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