Don't ignore them - restore them to previous values after the test is complete. This can be done with a test rule or a before/afterclass hook. See here, for example:
https://github.com/apache/lucene/blob/main/lucene/test-framework/src/java/org/apache/lucene/tests/util/LuceneTestCase.java#L642-L655 Dawid On Mon, Sep 19, 2022 at 11:46 PM Yuan Xiao <yuan.tu.x...@gmail.com> wrote: > We got system properties invariant errors from LuceneTestCase sometimes, > which were brought up by our dependencies. Is there any way to ignore some > system properties through annotation/settings? >