From 1d3fb3e9a9ea0e3d566632c0b827dad0295ce425 Mon Sep 17 00:00:00 2001 From: Uwe Schindler Date: Mon, 26 Dec 2016 20:15:06 +0100 Subject: [PATCH] LUCENE-7604: Disable test on Java 9 --- .../src/test/org/apache/lucene/search/TestLRUQueryCache.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lucene/core/src/test/org/apache/lucene/search/TestLRUQueryCache.java b/lucene/core/src/test/org/apache/lucene/search/TestLRUQueryCache.java index 460f4a7d342..87382f98387 100644 --- a/lucene/core/src/test/org/apache/lucene/search/TestLRUQueryCache.java +++ b/lucene/core/src/test/org/apache/lucene/search/TestLRUQueryCache.java @@ -51,6 +51,7 @@ import org.apache.lucene.index.SerialMergeScheduler; import org.apache.lucene.index.Term; import org.apache.lucene.search.BooleanClause.Occur; import org.apache.lucene.store.Directory; +import org.apache.lucene.util.Constants; import org.apache.lucene.util.IOUtils; import org.apache.lucene.util.LuceneTestCase; import org.apache.lucene.util.RamUsageTester; @@ -378,6 +379,7 @@ public class TestLRUQueryCache extends LuceneTestCase { // by the cache itself, not cache entries, and we want to make sure that // memory usage is not grossly underestimated. public void testRamBytesUsedConstantEntryOverhead() throws IOException { + LuceneTestCase.assumeFalse("RamUsageTester does not fully work on Java 9", Constants.JRE_IS_MINIMUM_JAVA9); final LRUQueryCache queryCache = new LRUQueryCache(1000000, 10000000, context -> true); final RamUsageTester.Accumulator acc = new RamUsageTester.Accumulator() { @@ -958,6 +960,8 @@ public class TestLRUQueryCache extends LuceneTestCase { } public void testDetectMutatedQueries() throws IOException { + LuceneTestCase.assumeFalse("LUCENE-7604: For some unknown reason the non-constant BadQuery#hashCode() does not trigger ConcurrentModificationException on Java 9 b150", + Constants.JRE_IS_MINIMUM_JAVA9); Directory dir = newDirectory(); final RandomIndexWriter w = new RandomIndexWriter(random(), dir); w.addDocument(new Document());