You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Fuud (JIRA)" <ji...@apache.org> on 2016/08/16 09:44:20 UTC
[jira] [Updated] (SUREFIRE-1259) ParallelComputerBuilder should not
filter out runners with zero children
[ https://issues.apache.org/jira/browse/SUREFIRE-1259?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Fuud updated SUREFIRE-1259:
---------------------------
Description:
ParallelComputerBuilder
{code}
private <T extends Runner> WrappedRunners wrapRunners( Collection<T> runners )
throws InitializationError
{
// Do NOT use allGroups here.
long childrenCounter = 0;
ArrayList<Runner> runs = new ArrayList<Runner>();
for ( T runner : runners )
{
if ( runner != null )
{
int children = countChildren( runner );
childrenCounter += children;
if ( children != 0 )
{
runs.add( runner );
}
}
}
return runs.isEmpty() ? new WrappedRunners() : new WrappedRunners( createSuite( runs ), childrenCounter );
}
{code}
JUnit does not enfore ParentRunner to report all it's children. Therefore zero children count should not be criteria to skip this runner.
I suggest to remove "if ( children != 0 )" condition and run runner anyway.
Pull request https://github.com/apache/maven-surefire/pull/114
was:
ParallelComputerBuilder
{code}
private <T extends Runner> WrappedRunners wrapRunners( Collection<T> runners )
throws InitializationError
{
// Do NOT use allGroups here.
long childrenCounter = 0;
ArrayList<Runner> runs = new ArrayList<Runner>();
for ( T runner : runners )
{
if ( runner != null )
{
int children = countChildren( runner );
childrenCounter += children;
if ( children != 0 )
{
runs.add( runner );
}
}
}
return runs.isEmpty() ? new WrappedRunners() : new WrappedRunners( createSuite( runs ), childrenCounter );
}
{code}
JUnit does not enfore ParentRunner to report all it's children. Therefore zero children count should not be criteria to skip this runner.
I suggest to remove "if ( children != 0 )" condition and run runner anyway.
> ParallelComputerBuilder should not filter out runners with zero children
> ------------------------------------------------------------------------
>
> Key: SUREFIRE-1259
> URL: https://issues.apache.org/jira/browse/SUREFIRE-1259
> Project: Maven Surefire
> Issue Type: Bug
> Components: Maven Failsafe Plugin
> Affects Versions: 2.19.1
> Reporter: Fuud
>
> ParallelComputerBuilder
> {code}
> private <T extends Runner> WrappedRunners wrapRunners( Collection<T> runners )
> throws InitializationError
> {
> // Do NOT use allGroups here.
> long childrenCounter = 0;
> ArrayList<Runner> runs = new ArrayList<Runner>();
> for ( T runner : runners )
> {
> if ( runner != null )
> {
> int children = countChildren( runner );
> childrenCounter += children;
> if ( children != 0 )
> {
> runs.add( runner );
> }
> }
> }
> return runs.isEmpty() ? new WrappedRunners() : new WrappedRunners( createSuite( runs ), childrenCounter );
> }
> {code}
> JUnit does not enfore ParentRunner to report all it's children. Therefore zero children count should not be criteria to skip this runner.
> I suggest to remove "if ( children != 0 )" condition and run runner anyway.
> Pull request https://github.com/apache/maven-surefire/pull/114
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)