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

Kristian Rosenvold closed SUREFIRE-705.
---------------------------------------

       Resolution: Fixed
    Fix Version/s: 2.8
         Assignee: Kristian Rosenvold

Fixed in r1076367

> Setting both "forkedProcessTimeoutInSeconds" and "parallel" fails with an 
> exception
> -----------------------------------------------------------------------------------
>
>                 Key: SUREFIRE-705
>                 URL: http://jira.codehaus.org/browse/SUREFIRE-705
>             Project: Maven Surefire
>          Issue Type: Bug
>          Components: Junit 4.7+ (parallel) support, process forking
>    Affects Versions: 2.7.2
>         Environment: OS X
>            Reporter: Jari Aarniala
>            Assignee: Kristian Rosenvold
>             Fix For: 2.8
>
>
> Setting forkedProcessTimeoutInSeconds to a non-zero value and having parallel 
> set throws an exception. Is this not supported?
> Reproducible with a minimal pom.xml:
> {code}
> <?xml version="1.0" encoding="utf-8"?>
> <project xmlns="http://maven.apache.org/POM/4.0.0"; 
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
>          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
> http://maven.apache.org/xsd/maven-4.0.0.xsd";>
>   <modelVersion>4.0.0</modelVersion>
>   <groupId>my.groupId</groupId>
>   <artifactId>my-archetype-id</artifactId>
>   <version>1.0-SNAPSHOT</version>
>   <packaging>jar</packaging>
>     <dependencies>
>       <dependency>
>         <groupId>junit</groupId>
>         <artifactId>junit</artifactId>
>         <version>4.8.2</version>
>         <scope>test</scope>
>       </dependency>
>     </dependencies>
>   <build>
>     <plugins>
>       <plugin>
>         <groupId>org.apache.maven.plugins</groupId>
>         <artifactId>maven-surefire-plugin</artifactId>
>         <version>2.7.2</version>
>         <configuration>
>           <forkedProcessTimeoutInSeconds>1</forkedProcessTimeoutInSeconds>
>           <parallel>classes</parallel>
>           <threadCount>10</threadCount>
>         </configuration>
>       </plugin>
>     </plugins>
>   </build>
> </project>
> {code}
> Stack trace:
> {code}
> -------------------------------------------------------
>  T E S T S
> -------------------------------------------------------
> Concurrency config is parallel='classes', perCoreThreadCount=true, 
> threadCount=10, useUnlimitedThreads=false
> java.lang.reflect.UndeclaredThrowableException
>       at $Proxy0.invoke(Unknown Source)
>       at 
> org.apache.maven.surefire.booter.SurefireStarter.invokeProvider(SurefireStarter.java:150)
>       at 
> org.apache.maven.surefire.booter.SurefireStarter.runSuitesInProcess(SurefireStarter.java:91)
>       at 
> org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:69)
> Caused by: java.lang.reflect.InvocationTargetException
>       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:597)
>       at 
> org.apache.maven.surefire.booter.ProviderFactory$ClassLoaderProxy.invoke(ProviderFactory.java:103)
>       ... 4 more
> Caused by: java.lang.IllegalStateException: Task already scheduled or 
> cancelled
>       at java.util.Timer.sched(Timer.java:358)
>       at java.util.Timer.schedule(Timer.java:170)
>       at 
> org.apache.maven.surefire.report.ReporterManagerFactory.startTimer(ReporterManagerFactory.java:206)
>       at 
> org.apache.maven.surefire.report.ReporterManagerFactory.createReporter(ReporterManagerFactory.java:105)
>       at 
> org.apache.maven.surefire.junitcore.ConcurrentReporterManager.<init>(ConcurrentReporterManager.java:64)
>       at 
> org.apache.maven.surefire.junitcore.ClassesParallelRunListener.<init>(ClassesParallelRunListener.java:38)
>       at 
> org.apache.maven.surefire.junitcore.ConcurrentReporterManager.createInstance(ConcurrentReporterManager.java:209)
>       at 
> org.apache.maven.surefire.junitcore.JUnitCoreProvider.invoke(JUnitCoreProvider.java:101)
>       ... 9 more
> {code}

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

        

Reply via email to