mirror of https://github.com/apache/lucene.git
LUCENE-8766: Further checks against race in test
This commit is contained in:
parent
d9dbb70d01
commit
c33177e428
|
@ -149,7 +149,9 @@ public class TestCachePurging extends MonitorTestBase {
|
||||||
monitor.addQueryIndexUpdateListener(new MonitorUpdateListener() {
|
monitor.addQueryIndexUpdateListener(new MonitorUpdateListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onPurge() {
|
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();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue