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


##########
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:
   `assertThat(keySelectorCache).hasSize(1)`



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