You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by "Mike Perham (JIRA)" <ji...@codehaus.org> on 2006/02/08 20:43:48 UTC

[jira] Created: (MSUREFIRE-59) JUnitBattery dies when TestSuite has an anonymous inner class

JUnitBattery dies when TestSuite has an anonymous inner class
-------------------------------------------------------------

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

    Versions: 2.1.2    
    Reporter: Mike Perham


I have this method in my test suite:

    private static File[] getWSDLFiles() {

        URL directoryURL = WSDLImportTestSuite.class.getResource("/com/webify/wsf/studio/core/wsdl/wsdls");
        if (directoryURL != null) {
            File directory = new File(directoryURL.getPath());

            FilenameFilter filter = new FilenameFilter() {
                public boolean accept(File dir, String name) {
                    return name.endsWith(".wsdl");
                }
            };
            return directory.listFiles(filter);
        }
        else {
            return null;
        }
    }

And surefire fails with this exception:

java.lang.NoSuchMethodException: com.webify.wsf.studio.core.wsdl.WSDLImportTestSuite$1.<init>()
        at java.lang.Class.getConstructor0(Class.java:1937)
        at java.lang.Class.getConstructor(Class.java:1027)
        at org.apache.maven.surefire.battery.JUnitBattery.getTestConstructor(JUnitBattery.java:307)
        at org.apache.maven.surefire.battery.JUnitBattery.processTestClass(JUnitBattery.java:150)
        at org.apache.maven.surefire.battery.JUnitBattery.<init>(JUnitBattery.java:81)
        at org.apache.maven.surefire.SurefireUtils.instantiateBattery(SurefireUtils.java:63)
        at org.apache.maven.surefire.Surefire.instantiateBatteries(Surefire.java:262)
        at org.apache.maven.surefire.Surefire.run(Surefire.java:140)
        at org.apache.maven.surefire.Surefire.run(Surefire.java:87)

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


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


[jira] Closed: (MSUREFIRE-59) JUnitBattery dies when TestSuite has an anonymous inner class

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

     Assign To: Brett Porter
    Resolution: Fixed

This may have been fixed in 2.1.3. I can't reproduce using the supplied class under iether 2.1.3 or 2.2

> JUnitBattery dies when TestSuite has an anonymous inner class
> -------------------------------------------------------------
>
>          Key: MSUREFIRE-59
>          URL: http://jira.codehaus.org/browse/MSUREFIRE-59
>      Project: Maven 2.x Surefire Plugin
>         Type: Bug

>     Versions: 2.1.2
>     Reporter: Mike Perham
>     Assignee: Brett Porter
>      Fix For: 2.1.3
>  Attachments: SimpleTestSuite.java
>
>
> I have this method in my test suite:
> {code}
>     private static File[] getWSDLFiles() {
>         URL directoryURL = WSDLImportTestSuite.class.getResource("/com/webify/wsf/studio/core/wsdl/wsdls");
>         if (directoryURL != null) {
>             File directory = new File(directoryURL.getPath());
>             FilenameFilter filter = new FilenameFilter() {
>                 public boolean accept(File dir, String name) {
>                     return name.endsWith(".wsdl");
>                 }
>             };
>             return directory.listFiles(filter);
>         }
>         else {
>             return null;
>         }
>     }
> {code}
> And surefire fails with this exception:
> java.lang.NoSuchMethodException: com.webify.wsf.studio.core.wsdl.WSDLImportTestSuite$1.<init>()
>         at java.lang.Class.getConstructor0(Class.java:1937)
>         at java.lang.Class.getConstructor(Class.java:1027)
>         at org.apache.maven.surefire.battery.JUnitBattery.getTestConstructor(JUnitBattery.java:307)
>         at org.apache.maven.surefire.battery.JUnitBattery.processTestClass(JUnitBattery.java:150)
>         at org.apache.maven.surefire.battery.JUnitBattery.<init>(JUnitBattery.java:81)
>         at org.apache.maven.surefire.SurefireUtils.instantiateBattery(SurefireUtils.java:63)
>         at org.apache.maven.surefire.Surefire.instantiateBatteries(Surefire.java:262)
>         at org.apache.maven.surefire.Surefire.run(Surefire.java:140)
>         at org.apache.maven.surefire.Surefire.run(Surefire.java:87)

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


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


[jira] Updated: (MSUREFIRE-59) JUnitBattery dies when TestSuite has an anonymous inner class

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

Carlos Sanchez updated MSUREFIRE-59:
------------------------------------

    Fix Version: 2.1.3

> JUnitBattery dies when TestSuite has an anonymous inner class
> -------------------------------------------------------------
>
>          Key: MSUREFIRE-59
>          URL: http://jira.codehaus.org/browse/MSUREFIRE-59
>      Project: Maven 2.x Surefire Plugin
>         Type: Bug

>     Versions: 2.1.2
>     Reporter: Mike Perham
>      Fix For: 2.1.3

>
>
> I have this method in my test suite:
> {code}
>     private static File[] getWSDLFiles() {
>         URL directoryURL = WSDLImportTestSuite.class.getResource("/com/webify/wsf/studio/core/wsdl/wsdls");
>         if (directoryURL != null) {
>             File directory = new File(directoryURL.getPath());
>             FilenameFilter filter = new FilenameFilter() {
>                 public boolean accept(File dir, String name) {
>                     return name.endsWith(".wsdl");
>                 }
>             };
>             return directory.listFiles(filter);
>         }
>         else {
>             return null;
>         }
>     }
> {code}
> And surefire fails with this exception:
> java.lang.NoSuchMethodException: com.webify.wsf.studio.core.wsdl.WSDLImportTestSuite$1.<init>()
>         at java.lang.Class.getConstructor0(Class.java:1937)
>         at java.lang.Class.getConstructor(Class.java:1027)
>         at org.apache.maven.surefire.battery.JUnitBattery.getTestConstructor(JUnitBattery.java:307)
>         at org.apache.maven.surefire.battery.JUnitBattery.processTestClass(JUnitBattery.java:150)
>         at org.apache.maven.surefire.battery.JUnitBattery.<init>(JUnitBattery.java:81)
>         at org.apache.maven.surefire.SurefireUtils.instantiateBattery(SurefireUtils.java:63)
>         at org.apache.maven.surefire.Surefire.instantiateBatteries(Surefire.java:262)
>         at org.apache.maven.surefire.Surefire.run(Surefire.java:140)
>         at org.apache.maven.surefire.Surefire.run(Surefire.java:87)

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


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


[jira] Commented: (MSUREFIRE-59) JUnitBattery dies when TestSuite has an anonymous inner class

Posted by "Carlos Sanchez (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MSUREFIRE-59?page=comments#action_58175 ] 

Carlos Sanchez commented on MSUREFIRE-59:
-----------------------------------------

it's complaining about the constructor, can you paste the constructors you have?

> JUnitBattery dies when TestSuite has an anonymous inner class
> -------------------------------------------------------------
>
>          Key: MSUREFIRE-59
>          URL: http://jira.codehaus.org/browse/MSUREFIRE-59
>      Project: Maven 2.x Surefire Plugin
>         Type: Bug

>     Versions: 2.1.2
>     Reporter: Mike Perham
>      Fix For: 2.1.3

>
>
> I have this method in my test suite:
> {code}
>     private static File[] getWSDLFiles() {
>         URL directoryURL = WSDLImportTestSuite.class.getResource("/com/webify/wsf/studio/core/wsdl/wsdls");
>         if (directoryURL != null) {
>             File directory = new File(directoryURL.getPath());
>             FilenameFilter filter = new FilenameFilter() {
>                 public boolean accept(File dir, String name) {
>                     return name.endsWith(".wsdl");
>                 }
>             };
>             return directory.listFiles(filter);
>         }
>         else {
>             return null;
>         }
>     }
> {code}
> And surefire fails with this exception:
> java.lang.NoSuchMethodException: com.webify.wsf.studio.core.wsdl.WSDLImportTestSuite$1.<init>()
>         at java.lang.Class.getConstructor0(Class.java:1937)
>         at java.lang.Class.getConstructor(Class.java:1027)
>         at org.apache.maven.surefire.battery.JUnitBattery.getTestConstructor(JUnitBattery.java:307)
>         at org.apache.maven.surefire.battery.JUnitBattery.processTestClass(JUnitBattery.java:150)
>         at org.apache.maven.surefire.battery.JUnitBattery.<init>(JUnitBattery.java:81)
>         at org.apache.maven.surefire.SurefireUtils.instantiateBattery(SurefireUtils.java:63)
>         at org.apache.maven.surefire.Surefire.instantiateBatteries(Surefire.java:262)
>         at org.apache.maven.surefire.Surefire.run(Surefire.java:140)
>         at org.apache.maven.surefire.Surefire.run(Surefire.java:87)

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


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


[jira] Commented: (MSUREFIRE-59) JUnitBattery dies when TestSuite has an anonymous inner class

Posted by "Mike Perham (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MSUREFIRE-59?page=comments#action_58172 ] 

Mike Perham commented on MSUREFIRE-59:
--------------------------------------

This works in 2.0 but fails when we upgrade to 2.1.2.

> JUnitBattery dies when TestSuite has an anonymous inner class
> -------------------------------------------------------------
>
>          Key: MSUREFIRE-59
>          URL: http://jira.codehaus.org/browse/MSUREFIRE-59
>      Project: Maven 2.x Surefire Plugin
>         Type: Bug

>     Versions: 2.1.2
>     Reporter: Mike Perham

>
>
> I have this method in my test suite:
> {code}
>     private static File[] getWSDLFiles() {
>         URL directoryURL = WSDLImportTestSuite.class.getResource("/com/webify/wsf/studio/core/wsdl/wsdls");
>         if (directoryURL != null) {
>             File directory = new File(directoryURL.getPath());
>             FilenameFilter filter = new FilenameFilter() {
>                 public boolean accept(File dir, String name) {
>                     return name.endsWith(".wsdl");
>                 }
>             };
>             return directory.listFiles(filter);
>         }
>         else {
>             return null;
>         }
>     }
> {code}
> And surefire fails with this exception:
> java.lang.NoSuchMethodException: com.webify.wsf.studio.core.wsdl.WSDLImportTestSuite$1.<init>()
>         at java.lang.Class.getConstructor0(Class.java:1937)
>         at java.lang.Class.getConstructor(Class.java:1027)
>         at org.apache.maven.surefire.battery.JUnitBattery.getTestConstructor(JUnitBattery.java:307)
>         at org.apache.maven.surefire.battery.JUnitBattery.processTestClass(JUnitBattery.java:150)
>         at org.apache.maven.surefire.battery.JUnitBattery.<init>(JUnitBattery.java:81)
>         at org.apache.maven.surefire.SurefireUtils.instantiateBattery(SurefireUtils.java:63)
>         at org.apache.maven.surefire.Surefire.instantiateBatteries(Surefire.java:262)
>         at org.apache.maven.surefire.Surefire.run(Surefire.java:140)
>         at org.apache.maven.surefire.Surefire.run(Surefire.java:87)

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


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


[jira] Updated: (MSUREFIRE-59) JUnitBattery dies when TestSuite has an anonymous inner class

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

Mike Perham updated MSUREFIRE-59:
---------------------------------

    Attachment: WSDLImportTestSuite.java

> JUnitBattery dies when TestSuite has an anonymous inner class
> -------------------------------------------------------------
>
>          Key: MSUREFIRE-59
>          URL: http://jira.codehaus.org/browse/MSUREFIRE-59
>      Project: Maven 2.x Surefire Plugin
>         Type: Bug

>     Versions: 2.1.2
>     Reporter: Mike Perham
>      Fix For: 2.1.3
>  Attachments: WSDLImportTestSuite.java
>
>
> I have this method in my test suite:
> {code}
>     private static File[] getWSDLFiles() {
>         URL directoryURL = WSDLImportTestSuite.class.getResource("/com/webify/wsf/studio/core/wsdl/wsdls");
>         if (directoryURL != null) {
>             File directory = new File(directoryURL.getPath());
>             FilenameFilter filter = new FilenameFilter() {
>                 public boolean accept(File dir, String name) {
>                     return name.endsWith(".wsdl");
>                 }
>             };
>             return directory.listFiles(filter);
>         }
>         else {
>             return null;
>         }
>     }
> {code}
> And surefire fails with this exception:
> java.lang.NoSuchMethodException: com.webify.wsf.studio.core.wsdl.WSDLImportTestSuite$1.<init>()
>         at java.lang.Class.getConstructor0(Class.java:1937)
>         at java.lang.Class.getConstructor(Class.java:1027)
>         at org.apache.maven.surefire.battery.JUnitBattery.getTestConstructor(JUnitBattery.java:307)
>         at org.apache.maven.surefire.battery.JUnitBattery.processTestClass(JUnitBattery.java:150)
>         at org.apache.maven.surefire.battery.JUnitBattery.<init>(JUnitBattery.java:81)
>         at org.apache.maven.surefire.SurefireUtils.instantiateBattery(SurefireUtils.java:63)
>         at org.apache.maven.surefire.Surefire.instantiateBatteries(Surefire.java:262)
>         at org.apache.maven.surefire.Surefire.run(Surefire.java:140)
>         at org.apache.maven.surefire.Surefire.run(Surefire.java:87)

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


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


[jira] Commented: (MSUREFIRE-59) JUnitBattery dies when TestSuite has an anonymous inner class

Posted by "Mike Perham (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MSUREFIRE-59?page=comments#action_58177 ] 

Mike Perham commented on MSUREFIRE-59:
--------------------------------------

The outer class has the standard () and (String) JUnit constructors.  The inner class's code is posted right there.  It's the FilenameFilter.

> JUnitBattery dies when TestSuite has an anonymous inner class
> -------------------------------------------------------------
>
>          Key: MSUREFIRE-59
>          URL: http://jira.codehaus.org/browse/MSUREFIRE-59
>      Project: Maven 2.x Surefire Plugin
>         Type: Bug

>     Versions: 2.1.2
>     Reporter: Mike Perham
>      Fix For: 2.1.3

>
>
> I have this method in my test suite:
> {code}
>     private static File[] getWSDLFiles() {
>         URL directoryURL = WSDLImportTestSuite.class.getResource("/com/webify/wsf/studio/core/wsdl/wsdls");
>         if (directoryURL != null) {
>             File directory = new File(directoryURL.getPath());
>             FilenameFilter filter = new FilenameFilter() {
>                 public boolean accept(File dir, String name) {
>                     return name.endsWith(".wsdl");
>                 }
>             };
>             return directory.listFiles(filter);
>         }
>         else {
>             return null;
>         }
>     }
> {code}
> And surefire fails with this exception:
> java.lang.NoSuchMethodException: com.webify.wsf.studio.core.wsdl.WSDLImportTestSuite$1.<init>()
>         at java.lang.Class.getConstructor0(Class.java:1937)
>         at java.lang.Class.getConstructor(Class.java:1027)
>         at org.apache.maven.surefire.battery.JUnitBattery.getTestConstructor(JUnitBattery.java:307)
>         at org.apache.maven.surefire.battery.JUnitBattery.processTestClass(JUnitBattery.java:150)
>         at org.apache.maven.surefire.battery.JUnitBattery.<init>(JUnitBattery.java:81)
>         at org.apache.maven.surefire.SurefireUtils.instantiateBattery(SurefireUtils.java:63)
>         at org.apache.maven.surefire.Surefire.instantiateBatteries(Surefire.java:262)
>         at org.apache.maven.surefire.Surefire.run(Surefire.java:140)
>         at org.apache.maven.surefire.Surefire.run(Surefire.java:87)

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


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


[jira] Updated: (MSUREFIRE-59) JUnitBattery dies when TestSuite has an anonymous inner class

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

Mike Perham updated MSUREFIRE-59:
---------------------------------

    Attachment: SimpleTestSuite.java

> JUnitBattery dies when TestSuite has an anonymous inner class
> -------------------------------------------------------------
>
>          Key: MSUREFIRE-59
>          URL: http://jira.codehaus.org/browse/MSUREFIRE-59
>      Project: Maven 2.x Surefire Plugin
>         Type: Bug

>     Versions: 2.1.2
>     Reporter: Mike Perham
>      Fix For: 2.1.3
>  Attachments: SimpleTestSuite.java
>
>
> I have this method in my test suite:
> {code}
>     private static File[] getWSDLFiles() {
>         URL directoryURL = WSDLImportTestSuite.class.getResource("/com/webify/wsf/studio/core/wsdl/wsdls");
>         if (directoryURL != null) {
>             File directory = new File(directoryURL.getPath());
>             FilenameFilter filter = new FilenameFilter() {
>                 public boolean accept(File dir, String name) {
>                     return name.endsWith(".wsdl");
>                 }
>             };
>             return directory.listFiles(filter);
>         }
>         else {
>             return null;
>         }
>     }
> {code}
> And surefire fails with this exception:
> java.lang.NoSuchMethodException: com.webify.wsf.studio.core.wsdl.WSDLImportTestSuite$1.<init>()
>         at java.lang.Class.getConstructor0(Class.java:1937)
>         at java.lang.Class.getConstructor(Class.java:1027)
>         at org.apache.maven.surefire.battery.JUnitBattery.getTestConstructor(JUnitBattery.java:307)
>         at org.apache.maven.surefire.battery.JUnitBattery.processTestClass(JUnitBattery.java:150)
>         at org.apache.maven.surefire.battery.JUnitBattery.<init>(JUnitBattery.java:81)
>         at org.apache.maven.surefire.SurefireUtils.instantiateBattery(SurefireUtils.java:63)
>         at org.apache.maven.surefire.Surefire.instantiateBatteries(Surefire.java:262)
>         at org.apache.maven.surefire.Surefire.run(Surefire.java:140)
>         at org.apache.maven.surefire.Surefire.run(Surefire.java:87)

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


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


[jira] Commented: (MSUREFIRE-59) JUnitBattery dies when TestSuite has an anonymous inner class

Posted by "Jason van Zyl (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MSUREFIRE-59?page=comments#action_59605 ] 

Jason van Zyl commented on MSUREFIRE-59:
----------------------------------------

Mike can you give me a little test case? 

I just deployed a new snapshot which improves forking output so that may help.

> JUnitBattery dies when TestSuite has an anonymous inner class
> -------------------------------------------------------------
>
>          Key: MSUREFIRE-59
>          URL: http://jira.codehaus.org/browse/MSUREFIRE-59
>      Project: Maven 2.x Surefire Plugin
>         Type: Bug

>     Versions: 2.1.2
>     Reporter: Mike Perham
>      Fix For: 2.1.3

>
>
> I have this method in my test suite:
> {code}
>     private static File[] getWSDLFiles() {
>         URL directoryURL = WSDLImportTestSuite.class.getResource("/com/webify/wsf/studio/core/wsdl/wsdls");
>         if (directoryURL != null) {
>             File directory = new File(directoryURL.getPath());
>             FilenameFilter filter = new FilenameFilter() {
>                 public boolean accept(File dir, String name) {
>                     return name.endsWith(".wsdl");
>                 }
>             };
>             return directory.listFiles(filter);
>         }
>         else {
>             return null;
>         }
>     }
> {code}
> And surefire fails with this exception:
> java.lang.NoSuchMethodException: com.webify.wsf.studio.core.wsdl.WSDLImportTestSuite$1.<init>()
>         at java.lang.Class.getConstructor0(Class.java:1937)
>         at java.lang.Class.getConstructor(Class.java:1027)
>         at org.apache.maven.surefire.battery.JUnitBattery.getTestConstructor(JUnitBattery.java:307)
>         at org.apache.maven.surefire.battery.JUnitBattery.processTestClass(JUnitBattery.java:150)
>         at org.apache.maven.surefire.battery.JUnitBattery.<init>(JUnitBattery.java:81)
>         at org.apache.maven.surefire.SurefireUtils.instantiateBattery(SurefireUtils.java:63)
>         at org.apache.maven.surefire.Surefire.instantiateBatteries(Surefire.java:262)
>         at org.apache.maven.surefire.Surefire.run(Surefire.java:140)
>         at org.apache.maven.surefire.Surefire.run(Surefire.java:87)

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


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


[jira] Commented: (MSUREFIRE-59) JUnitBattery dies when TestSuite has an anonymous inner class

Posted by "Mike Perham (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MSUREFIRE-59?page=comments#action_59670 ] 

Mike Perham commented on MSUREFIRE-59:
--------------------------------------

In fact 2.1.1 works also so this was a regression in 2.1.2.

> JUnitBattery dies when TestSuite has an anonymous inner class
> -------------------------------------------------------------
>
>          Key: MSUREFIRE-59
>          URL: http://jira.codehaus.org/browse/MSUREFIRE-59
>      Project: Maven 2.x Surefire Plugin
>         Type: Bug

>     Versions: 2.1.2
>     Reporter: Mike Perham
>      Fix For: 2.1.3
>  Attachments: WSDLImportTestSuite.java
>
>
> I have this method in my test suite:
> {code}
>     private static File[] getWSDLFiles() {
>         URL directoryURL = WSDLImportTestSuite.class.getResource("/com/webify/wsf/studio/core/wsdl/wsdls");
>         if (directoryURL != null) {
>             File directory = new File(directoryURL.getPath());
>             FilenameFilter filter = new FilenameFilter() {
>                 public boolean accept(File dir, String name) {
>                     return name.endsWith(".wsdl");
>                 }
>             };
>             return directory.listFiles(filter);
>         }
>         else {
>             return null;
>         }
>     }
> {code}
> And surefire fails with this exception:
> java.lang.NoSuchMethodException: com.webify.wsf.studio.core.wsdl.WSDLImportTestSuite$1.<init>()
>         at java.lang.Class.getConstructor0(Class.java:1937)
>         at java.lang.Class.getConstructor(Class.java:1027)
>         at org.apache.maven.surefire.battery.JUnitBattery.getTestConstructor(JUnitBattery.java:307)
>         at org.apache.maven.surefire.battery.JUnitBattery.processTestClass(JUnitBattery.java:150)
>         at org.apache.maven.surefire.battery.JUnitBattery.<init>(JUnitBattery.java:81)
>         at org.apache.maven.surefire.SurefireUtils.instantiateBattery(SurefireUtils.java:63)
>         at org.apache.maven.surefire.Surefire.instantiateBatteries(Surefire.java:262)
>         at org.apache.maven.surefire.Surefire.run(Surefire.java:140)
>         at org.apache.maven.surefire.Surefire.run(Surefire.java:87)

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


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


[jira] Updated: (MSUREFIRE-59) JUnitBattery dies when TestSuite has an anonymous inner class

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

Mike Perham updated MSUREFIRE-59:
---------------------------------

    Attachment:     (was: WSDLImportTestSuite.java)

> JUnitBattery dies when TestSuite has an anonymous inner class
> -------------------------------------------------------------
>
>          Key: MSUREFIRE-59
>          URL: http://jira.codehaus.org/browse/MSUREFIRE-59
>      Project: Maven 2.x Surefire Plugin
>         Type: Bug

>     Versions: 2.1.2
>     Reporter: Mike Perham
>      Fix For: 2.1.3
>  Attachments: SimpleTestSuite.java
>
>
> I have this method in my test suite:
> {code}
>     private static File[] getWSDLFiles() {
>         URL directoryURL = WSDLImportTestSuite.class.getResource("/com/webify/wsf/studio/core/wsdl/wsdls");
>         if (directoryURL != null) {
>             File directory = new File(directoryURL.getPath());
>             FilenameFilter filter = new FilenameFilter() {
>                 public boolean accept(File dir, String name) {
>                     return name.endsWith(".wsdl");
>                 }
>             };
>             return directory.listFiles(filter);
>         }
>         else {
>             return null;
>         }
>     }
> {code}
> And surefire fails with this exception:
> java.lang.NoSuchMethodException: com.webify.wsf.studio.core.wsdl.WSDLImportTestSuite$1.<init>()
>         at java.lang.Class.getConstructor0(Class.java:1937)
>         at java.lang.Class.getConstructor(Class.java:1027)
>         at org.apache.maven.surefire.battery.JUnitBattery.getTestConstructor(JUnitBattery.java:307)
>         at org.apache.maven.surefire.battery.JUnitBattery.processTestClass(JUnitBattery.java:150)
>         at org.apache.maven.surefire.battery.JUnitBattery.<init>(JUnitBattery.java:81)
>         at org.apache.maven.surefire.SurefireUtils.instantiateBattery(SurefireUtils.java:63)
>         at org.apache.maven.surefire.Surefire.instantiateBatteries(Surefire.java:262)
>         at org.apache.maven.surefire.Surefire.run(Surefire.java:140)
>         at org.apache.maven.surefire.Surefire.run(Surefire.java:87)

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


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


[jira] Updated: (MSUREFIRE-59) JUnitBattery dies when TestSuite has an anonymous inner class

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

Mike Perham updated MSUREFIRE-59:
---------------------------------

    Description: 
I have this method in my test suite:

{code}
    private static File[] getWSDLFiles() {

        URL directoryURL = WSDLImportTestSuite.class.getResource("/com/webify/wsf/studio/core/wsdl/wsdls");
        if (directoryURL != null) {
            File directory = new File(directoryURL.getPath());

            FilenameFilter filter = new FilenameFilter() {
                public boolean accept(File dir, String name) {
                    return name.endsWith(".wsdl");
                }
            };
            return directory.listFiles(filter);
        }
        else {
            return null;
        }
    }
{code}

And surefire fails with this exception:

java.lang.NoSuchMethodException: com.webify.wsf.studio.core.wsdl.WSDLImportTestSuite$1.<init>()
        at java.lang.Class.getConstructor0(Class.java:1937)
        at java.lang.Class.getConstructor(Class.java:1027)
        at org.apache.maven.surefire.battery.JUnitBattery.getTestConstructor(JUnitBattery.java:307)
        at org.apache.maven.surefire.battery.JUnitBattery.processTestClass(JUnitBattery.java:150)
        at org.apache.maven.surefire.battery.JUnitBattery.<init>(JUnitBattery.java:81)
        at org.apache.maven.surefire.SurefireUtils.instantiateBattery(SurefireUtils.java:63)
        at org.apache.maven.surefire.Surefire.instantiateBatteries(Surefire.java:262)
        at org.apache.maven.surefire.Surefire.run(Surefire.java:140)
        at org.apache.maven.surefire.Surefire.run(Surefire.java:87)

  was:
I have this method in my test suite:

    private static File[] getWSDLFiles() {

        URL directoryURL = WSDLImportTestSuite.class.getResource("/com/webify/wsf/studio/core/wsdl/wsdls");
        if (directoryURL != null) {
            File directory = new File(directoryURL.getPath());

            FilenameFilter filter = new FilenameFilter() {
                public boolean accept(File dir, String name) {
                    return name.endsWith(".wsdl");
                }
            };
            return directory.listFiles(filter);
        }
        else {
            return null;
        }
    }

And surefire fails with this exception:

java.lang.NoSuchMethodException: com.webify.wsf.studio.core.wsdl.WSDLImportTestSuite$1.<init>()
        at java.lang.Class.getConstructor0(Class.java:1937)
        at java.lang.Class.getConstructor(Class.java:1027)
        at org.apache.maven.surefire.battery.JUnitBattery.getTestConstructor(JUnitBattery.java:307)
        at org.apache.maven.surefire.battery.JUnitBattery.processTestClass(JUnitBattery.java:150)
        at org.apache.maven.surefire.battery.JUnitBattery.<init>(JUnitBattery.java:81)
        at org.apache.maven.surefire.SurefireUtils.instantiateBattery(SurefireUtils.java:63)
        at org.apache.maven.surefire.Surefire.instantiateBatteries(Surefire.java:262)
        at org.apache.maven.surefire.Surefire.run(Surefire.java:140)
        at org.apache.maven.surefire.Surefire.run(Surefire.java:87)


> JUnitBattery dies when TestSuite has an anonymous inner class
> -------------------------------------------------------------
>
>          Key: MSUREFIRE-59
>          URL: http://jira.codehaus.org/browse/MSUREFIRE-59
>      Project: Maven 2.x Surefire Plugin
>         Type: Bug

>     Versions: 2.1.2
>     Reporter: Mike Perham

>
>
> I have this method in my test suite:
> {code}
>     private static File[] getWSDLFiles() {
>         URL directoryURL = WSDLImportTestSuite.class.getResource("/com/webify/wsf/studio/core/wsdl/wsdls");
>         if (directoryURL != null) {
>             File directory = new File(directoryURL.getPath());
>             FilenameFilter filter = new FilenameFilter() {
>                 public boolean accept(File dir, String name) {
>                     return name.endsWith(".wsdl");
>                 }
>             };
>             return directory.listFiles(filter);
>         }
>         else {
>             return null;
>         }
>     }
> {code}
> And surefire fails with this exception:
> java.lang.NoSuchMethodException: com.webify.wsf.studio.core.wsdl.WSDLImportTestSuite$1.<init>()
>         at java.lang.Class.getConstructor0(Class.java:1937)
>         at java.lang.Class.getConstructor(Class.java:1027)
>         at org.apache.maven.surefire.battery.JUnitBattery.getTestConstructor(JUnitBattery.java:307)
>         at org.apache.maven.surefire.battery.JUnitBattery.processTestClass(JUnitBattery.java:150)
>         at org.apache.maven.surefire.battery.JUnitBattery.<init>(JUnitBattery.java:81)
>         at org.apache.maven.surefire.SurefireUtils.instantiateBattery(SurefireUtils.java:63)
>         at org.apache.maven.surefire.Surefire.instantiateBatteries(Surefire.java:262)
>         at org.apache.maven.surefire.Surefire.run(Surefire.java:140)
>         at org.apache.maven.surefire.Surefire.run(Surefire.java:87)

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


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