[ 
https://jira.codehaus.org/browse/SUREFIRE-1096?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Andreas Gudian closed SUREFIRE-1096.
------------------------------------

    Resolution: Fixed

For now, I committed a fix that lets surefire not crash when using forkCount>1, 
forkMode=true and suiteXmlFiles. Surefire will simply fall-back to acting like 
it was configured with forkCount=1.

I'll create a new issue for extending the reusable-forks feature to also work 
based on suiteXml files.

> ClassCastException: Fork test for TestNG with xmlsuite
> ------------------------------------------------------
>
>                 Key: SUREFIRE-1096
>                 URL: https://jira.codehaus.org/browse/SUREFIRE-1096
>             Project: Maven Surefire
>          Issue Type: Bug
>          Components: TestNG support
>    Affects Versions: 2.14, 2.15, 2.16, 2.17
>            Reporter: Michal Bocek
>            Assignee: Andreas Gudian
>             Fix For: 2.18
>
>
> When i setup surefire for forking tests via:
> {code}
> <forkCount>3</forkCount>
> <reuseForks>true</reuseForks>
> <parallel>false</parallel>
> {code}
> And i'm using TestNG provider with xml suite definition:
> {code}
> <suiteXmlFiles>
> <suiteXmlFile>suite.xml</suiteXmlFile>
> </suiteXmlFiles>
> {code}
> I'm getting exception:
> {code}
> Caused by: java.lang.ClassCastException: java.io.File cannot be cast to 
> java.lang.Class
>       at 
> org.apache.maven.plugin.surefire.booterclient.ForkStarter.runSuitesForkOnceMultiple(ForkStarter.java:201)
>       at 
> org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:160)
>       at 
> org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeProvider(AbstractSurefireMojo.java:806)
>       at 
> org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeAfterPreconditionsChecked(AbstractSurefireMojo.java:701)
>       at 
> org.apache.maven.plugin.surefire.AbstractSurefireMojo.execute(AbstractSurefireMojo.java:629)
>       at 
> org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:132)
> {code}



--
This message was sent by Atlassian JIRA
(v6.1.6#6162)

Reply via email to