pvary commented on code in PR #14406:
URL: https://github.com/apache/iceberg/pull/14406#discussion_r2454486845


##########
flink/v2.0/flink/src/main/java/org/apache/iceberg/flink/sink/dynamic/TableMetadataCache.java:
##########
@@ -50,13 +51,19 @@ class TableMetadataCache {
 
   private final Catalog catalog;
   private final long refreshMs;
+  private final Clock cacheRefreshClock;
   private final int inputSchemasPerTableCacheMaximumSize;
   private final Map<TableIdentifier, CacheItem> tableCache;
 
   TableMetadataCache(
-      Catalog catalog, int maximumSize, long refreshMs, int 
inputSchemasPerTableCacheMaximumSize) {
+      Catalog catalog,
+      int maximumSize,
+      long refreshMs,
+      Clock cacheRefreshClock,

Review Comment:
   Could we just create a separate constructor for testing, and annotate with 
`@VisibleForTesting`?
   I usually try to separate out the testing only code from the prod code as 
much as possible, and needing a `Clock` in the constructor is a bit confusing



-- 
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]

Reply via email to