aiborodin commented on code in PR #14406:
URL: https://github.com/apache/iceberg/pull/14406#discussion_r2587877538
##########
flink/v2.0/flink/src/test/java/org/apache/iceberg/flink/sink/dynamic/TestTableMetadataCache.java:
##########
@@ -87,8 +94,71 @@ void testCachingDisabled() {
Catalog catalog = CATALOG_EXTENSION.catalog();
TableIdentifier tableIdentifier = TableIdentifier.parse("default.myTable");
catalog.createTable(tableIdentifier, SCHEMA);
- TableMetadataCache cache = new TableMetadataCache(catalog, 0,
Long.MAX_VALUE, 10);
+ TableMetadataCache cache =
+ new TableMetadataCache(catalog, 0, Long.MAX_VALUE, Clock.systemUTC(),
10);
assertThat(cache.getInternalCache()).isEmpty();
}
+
+ @Test
+ void testNoCacheRefreshBeforeRefreshIntervalElapses() {
+ // Create table
+ Catalog catalog = CATALOG_EXTENSION.catalog();
+ TableIdentifier tableIdentifier = TableIdentifier.parse("default.myTable");
+ Table table = catalog.createTable(tableIdentifier, SCHEMA2);
+
+ // Create test clock
+ long firstEpochMillis = 1L;
+ MutableClock testClock = new MutableClock(ZoneOffset.UTC,
firstEpochMillis);
Review Comment:
I replaced this class with `Clock.fixed()`.
--
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]