liuxiaocs7 commented on code in PR #7159:
URL: https://github.com/apache/iceberg/pull/7159#discussion_r1143314803
##########
mr/src/test/java/org/apache/iceberg/mr/hive/TestHiveIcebergStorageHandlerNoScan.java:
##########
@@ -272,13 +269,12 @@ public void testCreateDropTableNonDefaultCatalog() throws
TException, Interrupte
shell.executeStatement("DROP TABLE default.customers");
// Check if the table was really dropped even from the Catalog
- AssertHelpers.assertThrows(
- "should throw exception",
- NoSuchTableException.class,
- "Table does not exist",
- () -> {
- testTables.loadTable(identifier);
- });
+ Assertions.assertThatThrownBy(
+ () -> {
+ testTables.loadTable(identifier);
+ })
+ .isInstanceOf(NoSuchTableException.class)
+ .hasMessageStartingWith("Table does not exist");
Review Comment:
There are two cases here:
```shell
Expecting actual:
"Table does not exist: default.customers"
```
```shell
Expecting actual:
"Table does not exist at location:
/tmp/junit7233921062738785052/default/customers"
```
so i use `hasMessageStartingWith` here.
--
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]