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


##########
flink/v2.0/flink/src/test/java/org/apache/iceberg/flink/sink/dynamic/TestHashKeyGenerator.java:
##########
@@ -317,18 +317,14 @@ void testCaching() throws Exception {
             writeParallelism);
 
     int writeKey1 = generator.generateKey(record);
-    assertThat(keySelectorCache.estimatedSize()).isEqualTo(1);
+    assertThat(keySelectorCache.size()).isEqualTo(1);
 
     int writeKey2 = generator.generateKey(record);
     assertThat(writeKey2).isNotEqualTo(writeKey1);
-    // Manually clean up because the cleanup is not always triggered
-    keySelectorCache.cleanUp();
-    assertThat(keySelectorCache.estimatedSize()).isEqualTo(1);
+    assertThat(keySelectorCache.size()).isEqualTo(1);
 
     int writeKey3 = generator.generateKey(record);
-    // Manually clean up because the cleanup is not always triggered
-    keySelectorCache.cleanUp();
-    assertThat(keySelectorCache.estimatedSize()).isEqualTo(1);
+    assertThat(keySelectorCache.size()).isEqualTo(1);

Review Comment:
   We can use this everwhere.
   This is a bit more descriptive



##########
flink/v2.0/flink/src/test/java/org/apache/iceberg/flink/sink/dynamic/TestTableMetadataCache.java:
##########
@@ -90,7 +90,6 @@ void testCachingDisabled() {
     TableMetadataCache cache = new TableMetadataCache(catalog, 0, 
Long.MAX_VALUE, 10);
 
     // Cleanup routine doesn't run after every write
-    cache.getInternalCache().cleanUp();
-    assertThat(cache.getInternalCache().estimatedSize()).isEqualTo(0);
+    assertThat(cache.getInternalCache().size()).isEqualTo(0);

Review Comment:
   We can use this everwhere.
   This is a bit more descriptive



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