laserninja commented on code in PR #11634:
URL: https://github.com/apache/gravitino/pull/11634#discussion_r3423042014
##########
iceberg/iceberg-rest-server/src/test/java/org/apache/gravitino/iceberg/service/rest/IcebergRestTestUtil.java:
##########
@@ -139,9 +148,15 @@ public static ResourceConfig getIcebergResourceConfig(
IcebergConfigProvider configProvider =
IcebergConfigProviderFactory.create(catalogConf);
configProvider.initialize(catalogConf);
// used to override register table interface
- IcebergCatalogWrapperManager icebergCatalogWrapperManager =
- new IcebergCatalogWrapperManagerForTest(
- catalogConf, configProvider, false,
configProvider.getMetalakeName());
+ IcebergCatalogWrapperManager icebergCatalogWrapperManager;
Review Comment:
Reflection was used here to keep the overload generic, it accepts any
Class<? extends IcebergCatalogWrapperManager> so tests can plug in different
wrapper manager subclasses (e.g., NoScanPlanWrapperManager) without adding a
new overload for each one.
That said, I can replace the reflection with a
Supplier<IcebergCatalogWrapperManager> or a simple factory lambda instead,
that's cleaner and avoids the unchecked reflection. Would you prefer that
approach, or would you rather I just pass in an already-constructed instance?
--
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]