LUCENE-8766: Further checks against race in test

This commit is contained in:
Alan Woodward 2019-06-24 10:03:43 +01:00
parent d9dbb70d01
commit c33177e428
1 changed files with 3 additions and 1 deletions

View File

@ -149,6 +149,8 @@ public class TestCachePurging extends MonitorTestBase {
monitor.addQueryIndexUpdateListener(new MonitorUpdateListener() { monitor.addQueryIndexUpdateListener(new MonitorUpdateListener() {
@Override @Override
public void onPurge() { public void onPurge() {
// It can sometimes take a couple of purge runs to get everything in sync
if (monitor.getQueryCacheStats().cachedQueries == 99)
latch.countDown(); latch.countDown();
} }
}); });