FANNG1 commented on code in PR #6773:
URL: https://github.com/apache/gravitino/pull/6773#discussion_r2022074229
##########
flink-connector/flink/src/test/java/org/apache/gravitino/flink/connector/integration/test/hive/FlinkHiveCatalogIT.java:
##########
@@ -156,9 +157,10 @@ public void testCreateGravitinoHiveCatalog() {
tableEnv.useCatalog(DEFAULT_CATALOG);
tableEnv.executeSql("drop catalog " + catalogName);
Assertions.assertFalse(metalake.catalogExists(catalogName));
-
- Optional<Catalog> droppedCatalog = tableEnv.getCatalog(catalogName);
- Assertions.assertFalse(droppedCatalog.isPresent(), "Catalog should be
dropped");
+ Assertions.assertThrows(
Review Comment:
According to the API of `CatalogStore`, is it proper to throw
CatalogException when catalog is not exists?
```
/**
* Get a catalog by name.
*
* @param catalogName name of the catalog to retrieve
* @return the requested catalog or empty if the catalog does not exist
* @throws CatalogException in case of any runtime exception
*/
Optional<CatalogDescriptor> getCatalog(String catalogName) throws
CatalogException;
```
--
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]