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

Chris Hansen commented on SUREFIRE-1055:
----------------------------------------

@Tibor
Thank you for the suggestion. It is something I had tried using 
System.out.println(...) prior to submitting a bug. However, just now I was able 
to get a consistent test count by writing the count to a file in a shutdown 
hook. That means you are correct that the tests are being run, and there is a 
logging issue. I think System.out.println() output is subject to the same 
logging issue in question, which is why I hadn't gotten a consistent count 
previously.

Is there an existing Jira issue for this (in which case I can close this one) 
or shall I change this issue to describe the logging bug?

Also, thank you for your work on SUREFIRE-814, Tibor.

> Parallel JUnit does not run all test methods with parallel=classesAndMethods 
> perCoreThreadCount=false useUnlimitedThreads=true and threadCountMethods 
> specified
> ---------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: SUREFIRE-1055
>                 URL: https://jira.codehaus.org/browse/SUREFIRE-1055
>             Project: Maven Surefire
>          Issue Type: Bug
>          Components: Junit 4.7+ (parallel) support, Maven Failsafe Plugin, 
> Maven Surefire Plugin
>    Affects Versions: 2.16
>            Reporter: Chris Hansen
>         Attachments: surefire-output.txt
>
>
> Some test methods are skipped at random with the below configuration. When 
> test methods are skipped in this way, only one method in the class runs. 
> Running tests repeatedly with no code change often yields a different number 
> of tests with each run (e.g. see the attached surefire-output.txt). Tests 
> that take longer to run are less likely to be affected. This affects version 
> 2.16 of Surefire and Failsafe equally.
> Here is a simple test project which reproduces the issue: 
> https://github.com/hansenc/SUREFIRE-1055
> It has a few simple test classes with a naming convention for how many test 
> methods are in each class (e.g. Methods4Test has 4 test methods).
> {code:xml}
> <plugin>
>     <groupId>org.apache.maven.plugins</groupId>
>     <artifactId>maven-surefire-plugin</artifactId>
>     <version>2.16</version>
>     <configuration>
>         <parallel>classesAndMethods</parallel>
>         <perCoreThreadCount>false</perCoreThreadCount>
>         <useUnlimitedThreads>true</useUnlimitedThreads>
>         <threadCountMethods>3</threadCountMethods>
>     </configuration>
> </plugin>
> {code}



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

Reply via email to