Hi Folks, I was working on PR LUCENE-9476 <https://github.com/apache/lucene-solr/pull/2247> when we found cases where `asserts` in test cases were always enabled. To verify whether this was true, I wrote a simple test case that called assert 1000 times, modified a variable and then checked its value. This test case always passed because `assert` was always enabled.
Mike McCandless mentioned in the PR that Lucene earlier had the capability to randomly disable `asserts` so that there were no accidental cases of developers relying on `asserts` always being enabled. We may have lost this feature when the project transitioned to Gradle. When I change the default value of `tests.asserts` in randomization.gradle to false, the test fails promptly. Has anyone else noticed this/knows more about this? Thanks, Gautam Worah.
