You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@solr.apache.org by "Pierre Salagnac (Jira)" <ji...@apache.org> on 2025/03/11 20:47:00 UTC
[jira] [Assigned] (SOLR-17651) Obfuscate System.exit(), remove direct usage
[ https://issues.apache.org/jira/browse/SOLR-17651?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Pierre Salagnac reassigned SOLR-17651:
--------------------------------------
Assignee: Pierre Salagnac
> 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
> Assignee: Pierre Salagnac
> 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: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org