[
https://issues.apache.org/jira/browse/SOLR-17651?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Houston Putman updated SOLR-17651:
----------------------------------
Status: Patch Available (was: Open)
> Obfuscate System.exit(), remove direct usage
> --------------------------------------------
>
> Key: SOLR-17651
> URL: https://issues.apache.org/jira/browse/SOLR-17651
> Project: Solr
> Issue Type: Improvement
> Components: cli, Tests
> Reporter: Houston Putman
> Priority: Major
>
> In SOLR-17379, we are removing the {{TestSecurityManager}} defined in Lucene
> that prohibits the usage of System.exit() in unit testing. This is important,
> since gradle will fail with very little information when a test does a
> System.exit() call.
> In Solr, the CLI will use System.exit() to fail and show the user. This makes
> sense as a CLI, but not in a unit test. It would be great if we could create
> a utility that can be called in Solr to mimic System.exit(), but in unit
> testing throw an exception instead. Then we could add System.exit() to
> forbidden-apis, and ensure that our testing code won't run into this.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]