Mailing List Archive

How to ignore system properties?
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?
Re: How to ignore system properties? [ In reply to ]
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.xiao@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?
>