[ 
https://jira.codehaus.org/browse/SUREFIRE-1037?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=333651#comment-333651
 ] 

Kristian Rosenvold commented on SUREFIRE-1037:
----------------------------------------------

We have a long tradition for breaking elapsed time calculation every now and 
then :) Did you actually check that this  first broke in 2.15 this time ?

The execution calculation time is (unfortunately) fairly convoluted and not 
/easily/ testable. I suppose it's about time we face the challenge though :) 
Maybe an IT that does 3-4 parallel "reallySleep(0.1, 0.5,1,2)" and we can 
assert that the run-time is within "acceptable" limits. The problem is always 
understanding "what" acceptable limits are, since reallSleep(0.1) can easily 
sleep for 0.5 every now and then, which gives unreliable tests.

Maybe there's some kind of unit test we can make.....


                
> Elapsed time is reported incorrectly for tests run in parallel
> --------------------------------------------------------------
>
>                 Key: SUREFIRE-1037
>                 URL: https://jira.codehaus.org/browse/SUREFIRE-1037
>             Project: Maven Surefire
>          Issue Type: Bug
>          Components: Junit 4.7+ (parallel) support
>    Affects Versions: 2.15, 2.16
>         Environment: Intel Core i7-3770
>            Reporter: David Grant
>
> Configuration:
> <plugin>
>   <artifactId>maven-surefire-plugin</artifactId>
>   <version>2.16</version>
>   <configuration>
>     <parallel>methods</parallel>
>     <threadCount>2</threadCount>
>   </configuration>
> </plugin>
> I am running a suite of JUnit tests in parallel with the above configuration. 
>  The "Time elapsed" reported after a test class is incorrect by a factor of 
> the number of threads in use.
> In my case, I am running tests on an eight core machine (see Environment), 
> with two threads-per-core.  The actual elapsed time is about 47s, but the 
> reported elapsed time is 741s.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to