sumeetgajjar commented on code in PR #4942:
URL: https://github.com/apache/iceberg/pull/4942#discussion_r889671887
##########
spark/v3.0/spark/src/test/java/org/apache/iceberg/spark/SparkTestBase.java:
##########
@@ -73,11 +73,7 @@ public static void startMetastoreAndSpark() {
SparkTestBase.catalog = (HiveCatalog)
CatalogUtil.loadCatalog(HiveCatalog.class.getName(), "hive",
ImmutableMap.of(), hiveConf);
- try {
- catalog.createNamespace(Namespace.of("default"));
- } catch (AlreadyExistsException ignored) {
- // the default namespace already exists. ignore the create error
- }
+ createNamespace(catalog, Namespace.of("default"));
Review Comment:
> We are in the same situation here than in the other places, like
TestSparkReaderDeletes.java, and there we chose to inline the check.
`SparkTestBaseWithCatalog` extends `SparkTestBase`, thus the method can be
reused in the child class.
However, `TestSparkReaderDeletes` does not fall in the above inheritance
hierarchy, thus we had to inline it.
There also does not exist a TestUtil class for Spark tests or else we could
have added the method to the util class and reused it everywhere.
--
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]