You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Geoffrey De Smet (JIRA)" <ji...@codehaus.org> on 2006/05/14 18:52:41 UTC

[jira] Created: (MSUREFIRE-109) [regression] Test-resources not on classpath in forkMode always

[regression] Test-resources not on classpath in forkMode always
---------------------------------------------------------------

         Key: MSUREFIRE-109
         URL: http://jira.codehaus.org/browse/MSUREFIRE-109
     Project: Maven 2.x Surefire Plugin
        Type: Bug

    Versions: 2.2    
    Reporter: Geoffrey De Smet


Before surefire plugin 2.2 at spring-richclient:
-  our build succeeded
- ValidationResultsTests worked
- <testFailureIgnore>true</testFailureIgnore> due to an unrelated testcase: HandlerTest 
- <forkMode>pertest</forkMode>

Since 2.2:
- our build failes
- ValidtorResultTests failed too
- while it's still <testFailureIgnore>true</testFailureIgnore> (how can it fail in that case?)
- <forkMode>pertest</forkMode> or <forkMode>always</forkMode> (same result)

The entire discussion (with stacktraces etc) on the user list is here:
http://article.gmane.org/gmane.comp.jakarta.turbine.maven.user/45131


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Updated: (SUREFIRE-116) [regression] Test-resources not on classpath in forkMode always

Posted by "Brett Porter (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/SUREFIRE-116?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Brett Porter updated SUREFIRE-116:
----------------------------------

    Patch Submitted: [Yes]

> [regression] Test-resources not on classpath in forkMode always
> ---------------------------------------------------------------
>
>                 Key: SUREFIRE-116
>                 URL: http://jira.codehaus.org/browse/SUREFIRE-116
>             Project: Maven Surefire
>          Issue Type: Bug
>    Affects Versions: 2.0 (2.2 plugin)
>            Reporter: Geoffrey De Smet
>             Fix For: 2.3.1
>
>         Attachments: JUnitTestSet.patch
>
>
> Before surefire plugin 2.2 at spring-richclient:
> -  our build succeeded
> - ValidationResultsTests worked
> - <testFailureIgnore>true</testFailureIgnore> due to an unrelated testcase: HandlerTest 
> - <forkMode>pertest</forkMode>
> Since 2.2:
> - our build failes
> - ValidtorResultTests failed too
> - while it's still <testFailureIgnore>true</testFailureIgnore> (how can it fail in that case?)
> - <forkMode>pertest</forkMode> or <forkMode>always</forkMode> (same result)
> The entire discussion (with stacktraces etc) on the user list is here:
> http://article.gmane.org/gmane.comp.jakarta.turbine.maven.user/45131

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (MSUREFIRE-109) [regression] Test-resources not on classpath in forkMode always

Posted by "Geoffrey De Smet (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MSUREFIRE-109?page=comments#action_65353 ] 

Geoffrey De Smet commented on MSUREFIRE-109:
--------------------------------------------

The build doesn't break with never, I haven't tested once.
The build does break with always, even with testFailureIgnore being true.
Also as far as I can see (output + surefire report), only HandlerTest fails: ValidatorTest works.

I've just committed the change <forkMode>never</forkMode> into spring-richclient.

Like you recommend, I 'v changed the static contructor (which is evil anyway) to a setUp() method.

Meanwhile something like that might be a isolated proof of concept for you guys:

public class MyTest extends TestCase {

  static {
    Url url = MyTest.class.getResource("myTestResource.xml");
    assertNotNull(url);
  }

}

> [regression] Test-resources not on classpath in forkMode always
> ---------------------------------------------------------------
>
>          Key: MSUREFIRE-109
>          URL: http://jira.codehaus.org/browse/MSUREFIRE-109
>      Project: Maven 2.x Surefire Plugin
>         Type: Bug

>     Versions: 2.2
>     Reporter: Geoffrey De Smet

>
>
> Before surefire plugin 2.2 at spring-richclient:
> -  our build succeeded
> - ValidationResultsTests worked
> - <testFailureIgnore>true</testFailureIgnore> due to an unrelated testcase: HandlerTest 
> - <forkMode>pertest</forkMode>
> Since 2.2:
> - our build failes
> - ValidtorResultTests failed too
> - while it's still <testFailureIgnore>true</testFailureIgnore> (how can it fail in that case?)
> - <forkMode>pertest</forkMode> or <forkMode>always</forkMode> (same result)
> The entire discussion (with stacktraces etc) on the user list is here:
> http://article.gmane.org/gmane.comp.jakarta.turbine.maven.user/45131

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Updated: (SUREFIRE-116) [regression] Test-resources not on classpath in forkMode always

Posted by "Brett Porter (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/SUREFIRE-116?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Brett Porter updated SUREFIRE-116:
----------------------------------

    Fix Version/s:     (was: 2.4)
                   2.3.1

I think this dupes the other issue that is already fixed

> [regression] Test-resources not on classpath in forkMode always
> ---------------------------------------------------------------
>
>                 Key: SUREFIRE-116
>                 URL: http://jira.codehaus.org/browse/SUREFIRE-116
>             Project: Maven Surefire
>          Issue Type: Bug
>    Affects Versions: 2.0 (2.2 plugin)
>            Reporter: Geoffrey De Smet
>             Fix For: 2.3.1
>
>         Attachments: JUnitTestSet.patch
>
>
> Before surefire plugin 2.2 at spring-richclient:
> -  our build succeeded
> - ValidationResultsTests worked
> - <testFailureIgnore>true</testFailureIgnore> due to an unrelated testcase: HandlerTest 
> - <forkMode>pertest</forkMode>
> Since 2.2:
> - our build failes
> - ValidtorResultTests failed too
> - while it's still <testFailureIgnore>true</testFailureIgnore> (how can it fail in that case?)
> - <forkMode>pertest</forkMode> or <forkMode>always</forkMode> (same result)
> The entire discussion (with stacktraces etc) on the user list is here:
> http://article.gmane.org/gmane.comp.jakarta.turbine.maven.user/45131

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (MSUREFIRE-109) [regression] Test-resources not on classpath in forkMode always

Posted by "Brett Porter (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MSUREFIRE-109?page=all ]

Brett Porter updated MSUREFIRE-109:
-----------------------------------

    Fix Version/s: 2.3

> [regression] Test-resources not on classpath in forkMode always
> ---------------------------------------------------------------
>
>                 Key: MSUREFIRE-109
>                 URL: http://jira.codehaus.org/browse/MSUREFIRE-109
>             Project: Maven 2.x Surefire Plugin
>          Issue Type: Bug
>    Affects Versions: 2.2
>            Reporter: Geoffrey De Smet
>             Fix For: 2.3
>
>
> Before surefire plugin 2.2 at spring-richclient:
> -  our build succeeded
> - ValidationResultsTests worked
> - <testFailureIgnore>true</testFailureIgnore> due to an unrelated testcase: HandlerTest 
> - <forkMode>pertest</forkMode>
> Since 2.2:
> - our build failes
> - ValidtorResultTests failed too
> - while it's still <testFailureIgnore>true</testFailureIgnore> (how can it fail in that case?)
> - <forkMode>pertest</forkMode> or <forkMode>always</forkMode> (same result)
> The entire discussion (with stacktraces etc) on the user list is here:
> http://article.gmane.org/gmane.comp.jakarta.turbine.maven.user/45131

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (SUREFIRE-116) [regression] Test-resources not on classpath in forkMode always

Posted by "Will Currie (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/SUREFIRE-116?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_86270 ] 

Will Currie commented on SUREFIRE-116:
--------------------------------------

I needed to get the forkMode=always option to work with a Junit TestCase that has a suite() method. It appeared that JUnitTestSet was not setting the classloader properly when it was building up the list of things to fork. I was getting the following when trying to run MyTest (foo.properties was in target/test-classes):

Caused by: org.apache.maven.surefire.booter.SurefireBooterForkException: foo.MyTest; nested exception is java.io.FileNotFoundException: class path resource [foo.properties] cannot be opened because it does not exist; nested exception is org.apache.maven.surefire.testset.TestSetFailedException: foo.MyTest; nested exception is java.io.FileNotFoundException: class path resource [foo.properties] cannot be opened because it does not exist
        at org.apache.maven.surefire.booter.SurefireBooter.getTestSets(SurefireBooter.java:398)
        at org.apache.maven.surefire.booter.SurefireBooter.runSuitesForkPerTestSet(SurefireBooter.java:337)
        at org.apache.maven.surefire.booter.SurefireBooter.run(SurefireBooter.java:201)
        at org.apache.maven.plugin.surefire.SurefirePlugin.execute(SurefirePlugin.java:398)
        ... 18 more
Caused by: org.apache.maven.surefire.testset.TestSetFailedException: foo.MyTest; nested exception is java.io.FileNotFoundException: class path resource [foo.properties] cannot be opened because it does not exist
        at org.apache.maven.surefire.junit.JUnitTestSet.getTestCount(JUnitTestSet.java:260)
        at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.locateTestSets(AbstractDirectoryTestSuite.java:101)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at org.apache.maven.surefire.booter.SurefireBooter.getTestSets(SurefireBooter.java:386)
        ... 21 more
Caused by: java.io.FileNotFoundException: class path resource [foo.properties] cannot be opened because it does not exist
        at org.springframework.core.io.ClassPathResource.getInputStream(ClassPathResource.java:135)
        at foo.MyTest.suite(MyTest.java:86)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at org.apache.maven.surefire.junit.JUnitTestSet.createInstanceFromSuiteMethod(JUnitTestSet.java:177) 
        at org.apache.maven.surefire.junit.JUnitTestSet.constructTestObject(JUnitTestSet.java:137) 
        at org.apache.maven.surefire.junit.JUnitTestSet.getTestCount(JUnitTestSet.java:244)
        ... 27 more

I made the following to change to JUnitTestSet in the 2.3-SNAPSHOT and the problem appears solved:

--- surefire-providers/surefire-junit/src/main/java/org/apache/maven/surefire/junit/JUnitTestSet.java   (revision 498497)
+++ surefire-providers/surefire-junit/src/main/java/org/apache/maven/surefire/junit/JUnitTestSet.java   (working copy)
@@ -174,7 +174,14 @@
 
             if ( Modifier.isPublic( suiteMethod.getModifiers() ) && Modifier.isStatic( suiteMethod.getModifiers() ) )
             {
-                testObject = suiteMethod.invoke( null, EMPTY_CLASS_ARRAY );
+                ClassLoader previousLoader = Thread.currentThread().getContextClassLoader();
+                try {
+                    Thread.currentThread().setContextClassLoader( testClass.getClassLoader() );
+                    
+                    testObject = suiteMethod.invoke( null, EMPTY_CLASS_ARRAY );
+                } finally {
+                    Thread.currentThread().setContextClassLoader( previousLoader );
+                }
             }
         }
         catch ( NoSuchMethodException e )

How do I go about submitting this as a patch?

> [regression] Test-resources not on classpath in forkMode always
> ---------------------------------------------------------------
>
>                 Key: SUREFIRE-116
>                 URL: http://jira.codehaus.org/browse/SUREFIRE-116
>             Project: Maven Surefire
>          Issue Type: Bug
>    Affects Versions: 2.0 (2.2 plugin)
>            Reporter: Geoffrey De Smet
>             Fix For: 2.3
>
>
> Before surefire plugin 2.2 at spring-richclient:
> -  our build succeeded
> - ValidationResultsTests worked
> - <testFailureIgnore>true</testFailureIgnore> due to an unrelated testcase: HandlerTest 
> - <forkMode>pertest</forkMode>
> Since 2.2:
> - our build failes
> - ValidtorResultTests failed too
> - while it's still <testFailureIgnore>true</testFailureIgnore> (how can it fail in that case?)
> - <forkMode>pertest</forkMode> or <forkMode>always</forkMode> (same result)
> The entire discussion (with stacktraces etc) on the user list is here:
> http://article.gmane.org/gmane.comp.jakarta.turbine.maven.user/45131

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Closed: (SUREFIRE-116) [regression] Test-resources not on classpath in forkMode always

Posted by "Brett Porter (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/SUREFIRE-116?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Brett Porter closed SUREFIRE-116.
---------------------------------

         Assignee: Brett Porter
       Resolution: Cannot Reproduce
    Fix Version/s:     (was: 2.3.1)

I can't reproduce this problem with 2.2 using the following test case:

http://jira.codehaus.org/browse/SUREFIRE-116#action_65353

> [regression] Test-resources not on classpath in forkMode always
> ---------------------------------------------------------------
>
>                 Key: SUREFIRE-116
>                 URL: http://jira.codehaus.org/browse/SUREFIRE-116
>             Project: Maven Surefire
>          Issue Type: Bug
>    Affects Versions: 2.0 (2.2 plugin)
>            Reporter: Geoffrey De Smet
>            Assignee: Brett Porter
>         Attachments: JUnitTestSet.patch
>
>
> Before surefire plugin 2.2 at spring-richclient:
> -  our build succeeded
> - ValidationResultsTests worked
> - <testFailureIgnore>true</testFailureIgnore> due to an unrelated testcase: HandlerTest 
> - <forkMode>pertest</forkMode>
> Since 2.2:
> - our build failes
> - ValidtorResultTests failed too
> - while it's still <testFailureIgnore>true</testFailureIgnore> (how can it fail in that case?)
> - <forkMode>pertest</forkMode> or <forkMode>always</forkMode> (same result)
> The entire discussion (with stacktraces etc) on the user list is here:
> http://article.gmane.org/gmane.comp.jakarta.turbine.maven.user/45131

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (SUREFIRE-116) [regression] Test-resources not on classpath in forkMode always

Posted by "Will Currie (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/SUREFIRE-116?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Will Currie updated SUREFIRE-116:
---------------------------------

    Attachment: JUnitTestSet.patch

My attempt at fixing missing classpath resources when using forkMode=always.

> [regression] Test-resources not on classpath in forkMode always
> ---------------------------------------------------------------
>
>                 Key: SUREFIRE-116
>                 URL: http://jira.codehaus.org/browse/SUREFIRE-116
>             Project: Maven Surefire
>          Issue Type: Bug
>    Affects Versions: 2.0 (2.2 plugin)
>            Reporter: Geoffrey De Smet
>             Fix For: 2.3
>
>         Attachments: JUnitTestSet.patch
>
>
> Before surefire plugin 2.2 at spring-richclient:
> -  our build succeeded
> - ValidationResultsTests worked
> - <testFailureIgnore>true</testFailureIgnore> due to an unrelated testcase: HandlerTest 
> - <forkMode>pertest</forkMode>
> Since 2.2:
> - our build failes
> - ValidtorResultTests failed too
> - while it's still <testFailureIgnore>true</testFailureIgnore> (how can it fail in that case?)
> - <forkMode>pertest</forkMode> or <forkMode>always</forkMode> (same result)
> The entire discussion (with stacktraces etc) on the user list is here:
> http://article.gmane.org/gmane.comp.jakarta.turbine.maven.user/45131

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (SUREFIRE-116) [regression] Test-resources not on classpath in forkMode always

Posted by "Brett Porter (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/SUREFIRE-116?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Brett Porter updated SUREFIRE-116:
----------------------------------

    Fix Version/s:     (was: 2.3)
                   2.4

> [regression] Test-resources not on classpath in forkMode always
> ---------------------------------------------------------------
>
>                 Key: SUREFIRE-116
>                 URL: http://jira.codehaus.org/browse/SUREFIRE-116
>             Project: Maven Surefire
>          Issue Type: Bug
>    Affects Versions: 2.0 (2.2 plugin)
>            Reporter: Geoffrey De Smet
>             Fix For: 2.4
>
>         Attachments: JUnitTestSet.patch
>
>
> Before surefire plugin 2.2 at spring-richclient:
> -  our build succeeded
> - ValidationResultsTests worked
> - <testFailureIgnore>true</testFailureIgnore> due to an unrelated testcase: HandlerTest 
> - <forkMode>pertest</forkMode>
> Since 2.2:
> - our build failes
> - ValidtorResultTests failed too
> - while it's still <testFailureIgnore>true</testFailureIgnore> (how can it fail in that case?)
> - <forkMode>pertest</forkMode> or <forkMode>always</forkMode> (same result)
> The entire discussion (with stacktraces etc) on the user list is here:
> http://article.gmane.org/gmane.comp.jakarta.turbine.maven.user/45131

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (MSUREFIRE-109) [regression] Test-resources not on classpath in forkMode always

Posted by "Brett Porter (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MSUREFIRE-109?page=comments#action_65350 ] 

Brett Porter commented on MSUREFIRE-109:
----------------------------------------

Geoffrey: I'm very confused about the results you are getting from your explanation on the usres list.

You're saying it succeeds with once and never, but not always/pertest?

In my experiment, 2.1.3 worked under all modes, while 2.2 worked under none, which is what I'd expect.

However, if I move the static block to a setUp() method, the tests pass.

Basically, we need the class to be instantiated by the classloader that will run it. I thought that would be happening.

Nevertheless, I'd highly recommend using setUp() instead of a static initializer.

> [regression] Test-resources not on classpath in forkMode always
> ---------------------------------------------------------------
>
>          Key: MSUREFIRE-109
>          URL: http://jira.codehaus.org/browse/MSUREFIRE-109
>      Project: Maven 2.x Surefire Plugin
>         Type: Bug

>     Versions: 2.2
>     Reporter: Geoffrey De Smet

>
>
> Before surefire plugin 2.2 at spring-richclient:
> -  our build succeeded
> - ValidationResultsTests worked
> - <testFailureIgnore>true</testFailureIgnore> due to an unrelated testcase: HandlerTest 
> - <forkMode>pertest</forkMode>
> Since 2.2:
> - our build failes
> - ValidtorResultTests failed too
> - while it's still <testFailureIgnore>true</testFailureIgnore> (how can it fail in that case?)
> - <forkMode>pertest</forkMode> or <forkMode>always</forkMode> (same result)
> The entire discussion (with stacktraces etc) on the user list is here:
> http://article.gmane.org/gmane.comp.jakarta.turbine.maven.user/45131

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Moved: (SUREFIRE-116) [regression] Test-resources not on classpath in forkMode always

Posted by "Brett Porter (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/SUREFIRE-116?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Brett Porter moved MSUREFIRE-109 to SUREFIRE-116:
-------------------------------------------------

    Affects Version/s:     (was: 2.0 (2.2 plugin))
                       2.0 (2.2 plugin)
        Fix Version/s:     (was: 2.3)
                       2.3
                  Key: SUREFIRE-116  (was: MSUREFIRE-109)
              Project: Maven Surefire  (was: Maven 2.x Surefire Plugin)

> [regression] Test-resources not on classpath in forkMode always
> ---------------------------------------------------------------
>
>                 Key: SUREFIRE-116
>                 URL: http://jira.codehaus.org/browse/SUREFIRE-116
>             Project: Maven Surefire
>          Issue Type: Bug
>    Affects Versions: 2.0 (2.2 plugin)
>            Reporter: Geoffrey De Smet
>             Fix For: 2.3
>
>
> Before surefire plugin 2.2 at spring-richclient:
> -  our build succeeded
> - ValidationResultsTests worked
> - <testFailureIgnore>true</testFailureIgnore> due to an unrelated testcase: HandlerTest 
> - <forkMode>pertest</forkMode>
> Since 2.2:
> - our build failes
> - ValidtorResultTests failed too
> - while it's still <testFailureIgnore>true</testFailureIgnore> (how can it fail in that case?)
> - <forkMode>pertest</forkMode> or <forkMode>always</forkMode> (same result)
> The entire discussion (with stacktraces etc) on the user list is here:
> http://article.gmane.org/gmane.comp.jakarta.turbine.maven.user/45131

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (SUREFIRE-116) [regression] Test-resources not on classpath in forkMode always

Posted by "Jonathon Golden (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/SUREFIRE-116?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_96330 ] 

Jonathon Golden commented on SUREFIRE-116:
------------------------------------------

Hi,

I tried applying Will's patch to the 2.3.1 code base and it did not solve this problem for me, however if I run my tests with Junit4 this class loader bug  goes away. Perhaps the solution to the bug in the Junit3 provider can be found in the code for the Junit4 provider?

> [regression] Test-resources not on classpath in forkMode always
> ---------------------------------------------------------------
>
>                 Key: SUREFIRE-116
>                 URL: http://jira.codehaus.org/browse/SUREFIRE-116
>             Project: Maven Surefire
>          Issue Type: Bug
>    Affects Versions: 2.0 (2.2 plugin)
>            Reporter: Geoffrey De Smet
>             Fix For: 2.4
>
>         Attachments: JUnitTestSet.patch
>
>
> Before surefire plugin 2.2 at spring-richclient:
> -  our build succeeded
> - ValidationResultsTests worked
> - <testFailureIgnore>true</testFailureIgnore> due to an unrelated testcase: HandlerTest 
> - <forkMode>pertest</forkMode>
> Since 2.2:
> - our build failes
> - ValidtorResultTests failed too
> - while it's still <testFailureIgnore>true</testFailureIgnore> (how can it fail in that case?)
> - <forkMode>pertest</forkMode> or <forkMode>always</forkMode> (same result)
> The entire discussion (with stacktraces etc) on the user list is here:
> http://article.gmane.org/gmane.comp.jakarta.turbine.maven.user/45131

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira