Skip to content

Commit

Permalink
Lucene with Java 1.9 doesn't support unmap in MMapDirectory until Luc…
Browse files Browse the repository at this point in the history
…ene 6.4.0 (#22501)

The Java APIs for unmapping are changing, and Lucene 6.4.0 will
support it correctly, so until then we need an assume in this test
case.

See https://issues.apache.org/jira/browse/LUCENE-6989 for details.

Closes #22496
  • Loading branch information
Michael McCandless committed Jan 9, 2017
1 parent e7e1744 commit 13fe601
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
import org.apache.lucene.store.MMapDirectory;
import org.apache.lucene.store.MockDirectoryWrapper;
import org.apache.lucene.util.Bits;
import org.apache.lucene.util.Constants;
import org.elasticsearch.test.ESTestCase;

import java.io.IOException;
Expand Down Expand Up @@ -405,6 +406,7 @@ public void testAsSequentialAccessBits() throws Exception {
*/
public void testMMapHackSupported() throws Exception {
// add assume's here if needed for certain platforms, but we should know if it does not work.
assumeTrue("Lucene 6.3.0 doesn't support unmap with Java 9", Constants.JRE_IS_MINIMUM_JAVA9 == false);
assertTrue("MMapDirectory does not support unmapping: " + MMapDirectory.UNMAP_NOT_SUPPORTED_REASON, MMapDirectory.UNMAP_SUPPORTED);
}
}

0 comments on commit 13fe601

Please sign in to comment.