You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by "Uwe Schindler (Jira)" <ji...@apache.org> on 2021/12/20 15:19:00 UTC

[jira] [Created] (LUCENE-10330) Make the mmap directory tests fail by default, if unmapping does not work

Uwe Schindler created LUCENE-10330:
--------------------------------------

             Summary: Make the mmap directory tests fail by default, if unmapping does not work
                 Key: LUCENE-10330
                 URL: https://issues.apache.org/jira/browse/LUCENE-10330
             Project: Lucene - Core
          Issue Type: Improvement
          Components: core/store
    Affects Versions: 9.0, 9.1, 10.0 (main)
            Reporter: Uwe Schindler
            Assignee: Uwe Schindler


Since the recent refactoring with Java modules, we figured out that we have no tests, that MMapDirectory always works and is choosen as default (e.g. because you have a module setup where {{jdk.unsupported}} is missing (last seen on Luke) or since the refactoring of tests after LUCENE-10255 (se also discussion about how tests should be ran with module system in LUCENE-10328).

Currently TestMMapDirectory and similar ones silently disable themselves if the Unmap hack is not detected. The warning is hidne by gradle, so that's a bad default.

We should simply fail the test when unmapping does not work and just add an option to "still run tests". All current JDK are OpenJDK based (at least those in main/9.x as those use JDK 11), so the unmap hack always works.

Of course MMapDirectory still disables itsself at runtime, but we should make sure that we test it on known platforms.

Another option would be to check the assume and modify it to also check the version tring for "OpenJDK", "Oracle" and enforce that test is enabled. But this is too risky, so I would simply fail test if unmapping does not work with a system property to disable checks.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org