You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@solr.apache.org by David Smiley <ds...@apache.org> on 2023/05/01 22:10:35 UTC
Tests: system properties
There are a great many tests that clear system properties in an
"AfterClass" or "After" method in a test. But I think this should be
unnecessary thanks to SystemPropertiesRestoreRule that is installed at both
a test method level and a class/suite level (see SolrTestCaseJ4 and
SolrTestCase and search for SystemPropertiesRestoreRule).
Can we stop this outdated practice of clearing system properties in tests?
Or are there gotchas?
~ David Smiley
Apache Lucene/Solr Search Developer
http://www.linkedin.com/in/davidwsmiley