blcksrx commented on code in PR #14769:
URL: https://github.com/apache/iceberg/pull/14769#discussion_r2623371105
##########
flink/v2.1/flink/src/test/java/org/apache/iceberg/flink/TestFlinkCatalogFactory.java:
##########
@@ -106,6 +108,28 @@ public void testLoadCatalogUnknown() {
.hasMessageStartingWith("Unknown catalog-type: fooType");
}
+ @Test
+ public void testCacheCaseSensitivePropertyIsRespected() throws Exception {
+ String catalogName = "caseSensitiveCatalog";
+
+ props.put(
+ FlinkCatalogFactory.ICEBERG_CATALOG_TYPE,
FlinkCatalogFactory.ICEBERG_CATALOG_TYPE_HADOOP);
+ props.put(CatalogProperties.CACHE_ENABLED, "true");
+ props.put(CatalogProperties.CACHE_EXPIRATION_INTERVAL_MS, "-1");
+ props.put(CatalogProperties.CACHE_CASE_SENSITIVE, "false");
+ org.apache.flink.table.catalog.Catalog flinkCatalog =
+ new FlinkCatalogFactory().createCatalog(catalogName, props, new
Configuration());
+
+ Catalog icebergCatalog = ((FlinkCatalog) flinkCatalog).catalog();
+
+ assertThat(icebergCatalog).isInstanceOf(CachingCatalog.class);
+
+ Field field = CachingCatalog.class.getDeclaredField("caseSensitive");
Review Comment:
I’ve focused on ensuring the arguments are passed correctly in the test.
From my perspective, the suggested testing approach seems more aligned with how
`CachingCatalog` operates and its features, which I believe falls outside the
scope of this particular functionality.
That said, I noticed there’s currently no test for `caseSensitive` in
`TestCachingCatalog`. I can add one there if needed.
--
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]