You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@solr.apache.org by "Eric Pugh (Jira)" <ji...@apache.org> on 2026/02/19 14:14:00 UTC

[jira] [Commented] (SOLR-15788) Remove configset/sample_techproducts_config from being used in unit tests.

    [ https://issues.apache.org/jira/browse/SOLR-15788?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18059702#comment-18059702 ] 

Eric Pugh commented on SOLR-15788:
----------------------------------

HI all, in working on something else, I had to update ShowFileRequestHandlerTest and I took a stab at replacing 

 

{{{
initCore("solrconfig.xml", "schema.xml");
solrTestRule.startSolr(legacyExampleCollection1SolrHome());
}}}
 
with a much simpler:
{{{
EnvUtils.setProperty(
 
 
ALLOW_PATHS_SYSPROP,
 
 
ExternalPaths.SERVER_HOME.toAbsolutePath().toString());
 
 
solrTestRule.startSolr(createTempDir());
 
 
solrTestRule
 
 
.newCollection("collection1")
 
 
.withConfigSet(ExternalPaths.DEFAULT_CONFIGSET)
 
 
.create();
}}}
And it worked.  Yes, there is an annoying ALLOW_PATHS_SYSPROP that maybe we need to deal with.

> Remove configset/sample_techproducts_config from being used in unit tests.
> --------------------------------------------------------------------------
>
>                 Key: SOLR-15788
>                 URL: https://issues.apache.org/jira/browse/SOLR-15788
>             Project: Solr
>          Issue Type: Improvement
>          Components: Tests
>    Affects Versions: 9.0
>            Reporter: Eric Pugh
>            Assignee: Eric Pugh
>            Priority: Major
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> This is to remove the use of the method {{legacyExampleCollection1SolrHome}} which points to the {{solr/server/solr/configsets/sample_techproducts_configs}} directory, which means that as we make changes to our techproducts demos in the ref guide, we break unit tests, or, if we change it to support a unit test, we break something else.
> This is to experiment with moving the techproducts configs into {{solr/solrj/test-files}} and {{solr/core/test-files/}} directories, and then trying to slim them down.   I'm going to call the config "testproducts" ;-)



--
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