kbendick commented on a change in pull request #3801:
URL: https://github.com/apache/iceberg/pull/3801#discussion_r774866772



##########
File path: core/src/test/java/org/apache/iceberg/hadoop/TestCachingCatalog.java
##########
@@ -252,9 +254,9 @@ public void 
testCacheExpirationEagerlyRemovesMetadataTables() throws IOException
     ticker.advance(HALF_OF_EXPIRATION);
     
Assertions.assertThat(catalog.cache().asMap()).doesNotContainKey(tableIdent);
 
-    Arrays.stream(metadataTables(tableIdent)).forEach(metadataTable ->
-        Assert.assertFalse("When a data table expires, its metadata tables 
should expire regardless of age",
-            catalog.cache().asMap().containsKey(metadataTable)));
+    // Removal of metadata tables from cache is async, use awaitility

Review comment:
       If we update the Caffeine library from 2.8.4 to 
[2.8.5](https://github.com/ben-manes/caffeine/releases/tag/v2.8.5) and make the 
proposed changes, we won't have to introduce `Awaitility` yet, because the 
`TestableCachingCatalog` calls `cleanUp` on the cache already. I was wondering 
why this change was needed and noticed this bug fix in 2.8.5.
   
   ```
   Fixed expiration delay for scheduled cleanup
   ```
   
   But as mentioned, I think we should stick with the `Awaitility` introduction 
and remove the call to `cleanUp` and depend on `Awaitility` entirely in a 
separate PR.
   
   I also have another PR open to upgrade the `caffeine` library version, as 
there are some important bug fixes for us and since we've been mucking around 
in here, we might as well upgrade instead of stay behind. 
https://github.com/apache/iceberg/pull/3803




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