dlmarion commented on code in PR #2691:
URL: https://github.com/apache/accumulo/pull/2691#discussion_r870291495
##########
server/base/src/test/java/org/apache/accumulo/server/conf/store/impl/ZooPropLoaderTest.java:
##########
@@ -548,14 +543,13 @@ public void refreshSameVersionTest() throws Exception {
replay(context, zrw, propStoreWatcher, cacheMetrics, mockProps);
- PropCacheCaffeineImpl cache = new PropCacheCaffeineImpl.Builder(loader,
cacheMetrics)
- .withTicker(ticker).forTests().build();
+ PropCacheCaffeineImpl cache =
+ new PropCacheCaffeineImpl.Builder(loader,
cacheMetrics).forTests(ticker).build();
// prime cache
cache.get(propCacheKey);
ticker.advance(30, TimeUnit.MINUTES);
- cache.cleanUp();
Review Comment:
Because PropCacheCaffeineImpl.Builder is being created with `forTests` which
performs all maintenance tasks in the current test Thread. In testing my
earlier changes calling `cleanUp` may have forced the background tasks to kick
off, but they were still being done asynchronously.
--
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]