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