laserninja commented on code in PR #11634:
URL: https://github.com/apache/gravitino/pull/11634#discussion_r3781241256
##########
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:
Done - the reflection is gone. `IcebergRestTestUtil` now takes a
`WrapperManagerFactory` functional interface, so the wrapper manager
construction is resolved at compile time:
```java
@FunctionalInterface
public interface WrapperManagerFactory {
IcebergCatalogWrapperManager create(
Map<String, String> properties,
IcebergConfigProvider configProvider,
boolean auxMode,
String metalakeName);
}
```
Callers pass a constructor reference
(`IcebergCatalogWrapperManagerForTest::new`, `NoScanPlanWrapperManager::new`),
so a signature mismatch is a compile error instead of a runtime one.
I've also merged the latest main into the branch.
`:iceberg:iceberg-rest-server:test` is green (397 tests, 0 failures). The
earlier red `build (17)` check was an unrelated OceanBase testcontainer startup
failure.
--
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]