You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Steve Rowe (JIRA)" <ji...@apache.org> on 2014/09/12 21:10:33 UTC

[jira] [Resolved] (SOLR-6508) SolrSchemalessExampleTests never runs, and is currently broken

     [ https://issues.apache.org/jira/browse/SOLR-6508?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Steve Rowe resolved SOLR-6508.
------------------------------
       Resolution: Fixed
    Fix Version/s: 5.0
                   4.11

Committed to trunk and branch_4x.

> SolrSchemalessExampleTests never runs, and is currently broken
> --------------------------------------------------------------
>
>                 Key: SOLR-6508
>                 URL: https://issues.apache.org/jira/browse/SOLR-6508
>             Project: Solr
>          Issue Type: Test
>    Affects Versions: 4.7, 4.8, 4.9, 4.10, 5.0
>            Reporter: Steve Rowe
>            Assignee: Steve Rowe
>             Fix For: 4.11, 5.0
>
>         Attachments: SOLR-6508.patch
>
>
> When the Lucene/Solr JUnit tests are run under Ant, only those test suites with  {{.class}} filenames that match the following patterns are included (from {{test-macro}} in {{lucene/common-build.xml}}):
> {code:xml}
> <junit4:duplicate times="${tests.dups}">
>   <fileset dir="@{testsDir}">
>     <include name="**/Test*.class" />
>     <include name="**/*Test.class" />
>     <include name="${tests.explicitclass}" if="tests.explicitclass" />
>     <exclude name="**/*$*" />
>   </fileset>
> </junit4:duplicate>
> {code}
> {{SolrSchemalessExampleTests}} does not match any of the above patterns (note the trailing "s").
> In the current IntelliJ config, the Solrj JUnit run configuration includes this file (since no file patterns are used - but see LUCENE-5930, where this is being changed), and it succeeds when run there.
> But under Ant, after I rename the class to remove the trailing "s", its tests fail, e.g.:
> {noformat}
>    [junit4] ERROR   0.02s J3 | SolrSchemalessExampleTest.testCommitWithinOnDelete <<<
>    [junit4]    > Throwable #1: org.apache.solr.client.solrj.impl.HttpSolrServer$RemoteSolrException: access denied ("java.io.FilePermission" "/Users/sarowe/svn/lucene/dev/trunk/solr/example/example-schemaless/solr/collection1/conf/managed-schema" "write")
>    [junit4]    > 	at __randomizedtesting.SeedInfo.seed([BF11D05CC2B5A457:D30527ED18364E6C]:0)
>    [junit4]    > 	at org.apache.solr.client.solrj.impl.HttpSolrServer.executeMethod(HttpSolrServer.java:550)
>    [junit4]    > 	at org.apache.solr.client.solrj.impl.HttpSolrServer.request(HttpSolrServer.java:210)
>    [junit4]    > 	at org.apache.solr.client.solrj.impl.HttpSolrServer.request(HttpSolrServer.java:206)
>    [junit4]    > 	at org.apache.solr.client.solrj.request.AbstractUpdateRequest.process(AbstractUpdateRequest.java:124)
>    [junit4]    > 	at org.apache.solr.client.solrj.SolrServer.add(SolrServer.java:116)
>    [junit4]    > 	at org.apache.solr.client.solrj.SolrServer.add(SolrServer.java:102)
>    [junit4]    > 	at org.apache.solr.client.solrj.SolrExampleTestsBase.testCommitWithinOnDelete(SolrExampleTestsBase.java:135)
>    [junit4]    > 	at java.lang.Thread.run(Thread.java:745)
> {noformat}
> It apparently hasn't been run from the Ant build since before the security manager stuff disallowing writes outside the build dir was put in place.
> I checked all of Lucene&Solr for other similarly named classes and couldn't find any, except those that were apparently intentionally named {{\*Tests}} to avoid being treated as test suites, e.g. {{SolrExampleTests}}.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org