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

Steven Rowe edited comment on LUCENE-3323 at 7/16/11 10:34 PM:
---------------------------------------------------------------

Switch junit CWD from {{$\{project.build.testOutputDirectory\}}} to 
{{$\{project.build.directory\}/test}}, and sysprop {{tempDir}} from {{temp/}} 
to {{./}}, allows this test to succeed.  All other tests pass too.

Here's the patch:

{code:xml}
Index: dev-tools/maven/pom.xml.template
===================================================================
--- dev-tools/maven/pom.xml.template    (revision 1147495)
+++ dev-tools/maven/pom.xml.template    (working copy)
@@ -431,9 +431,9 @@
           <version>2.7.1</version>
           <configuration>
             <reportFormat>plain</reportFormat>
-            
<workingDirectory>${project.build.testOutputDirectory}</workingDirectory>
+            
<workingDirectory>${project.build.directory}/test</workingDirectory>
             <systemPropertyVariables>
-              <tempDir>temp</tempDir>
+              <tempDir>.</tempDir>
               <jetty.testMode>1</jetty.testMode>
               <tests.codec>${tests.codec}</tests.codec>
               <tests.directory>${tests.directory}</tests.directory>
{code}

Committing shortly.

      was (Author: steve_rowe):
    Switch junit CWD from {{${project.build.testOutputDirectory}}} to 
{{${project.build.directory}/test}}, and sysprop {{tempDir}} from {{temp/}} to 
{{./}}, allows this test to succeed.  All other tests pass too.

Here's the patch:

{code}
Index: dev-tools/maven/pom.xml.template
===================================================================
--- dev-tools/maven/pom.xml.template    (revision 1147495)
+++ dev-tools/maven/pom.xml.template    (working copy)
@@ -431,9 +431,9 @@
           <version>2.7.1</version>
           <configuration>
             <reportFormat>plain</reportFormat>
-            
<workingDirectory>${project.build.testOutputDirectory}</workingDirectory>
+            
<workingDirectory>${project.build.directory}/test</workingDirectory>
             <systemPropertyVariables>
-              <tempDir>temp</tempDir>
+              <tempDir>.</tempDir>
               <jetty.testMode>1</jetty.testMode>
               <tests.codec>${tests.codec}</tests.codec>
               <tests.directory>${tests.directory}</tests.directory>
{code}

Committing shortly.
  
> Maven build: Junit CWD being the same as the test output directory doesn't 
> always work
> --------------------------------------------------------------------------------------
>
>                 Key: LUCENE-3323
>                 URL: https://issues.apache.org/jira/browse/LUCENE-3323
>             Project: Lucene - Java
>          Issue Type: Bug
>          Components: general/build
>    Affects Versions: 3.4, 4.0
>            Reporter: Steven Rowe
>            Assignee: Steven Rowe
>
> {{TestJmxIntegration.testJmxOnCoreReload()}}, a new test committed as part of 
> SOLR-2623, fails on both 
> [trunk|https://builds.apache.org/job/Lucene-Solr-Maven-trunk/189/testReport/junit/org.apache.solr.core/TestJmxIntegration/testJmxOnCoreReload/]
>  and 
> [branch_3x|https://builds.apache.org/job/Lucene-Solr-Maven-3.x/186/testReport/org.apache.solr.core/TestJmxIntegration/testJmxOnCoreReload/].
> Example output:
> {quote}
> java.lang.RuntimeException: Can't find resource 'solrconfig.xml' in classpath 
> or 'solr/solr/conf/', 
> cwd=/usr/home/hudson/hudson-slave/workspace/Lucene-Solr-Maven-3.x/checkout/solr/build/solr-maven/classes/test
>       at 
> org.apache.solr.core.SolrResourceLoader.openResource(SolrResourceLoader.java:268)
>         ...
> {quote}

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to