Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SUREFIRE-1964] Support for method filtering on excludesFile and includesFile #400

Closed
Prev Previous commit
Next Next commit
Fix on filtering test classes
  • Loading branch information
imonteroperez committed Dec 21, 2021
commit 4e33bf1b6eeb2770c507b8e28fd4bb889f75bfc2
Original file line number Diff line number Diff line change
Expand Up @@ -2244,11 +2244,26 @@ private void maybeAppendList( List<String> base, List<String> list )
actualExcludes = Collections.singletonList( getDefaultExcludes() );
}
}
return new IncludeExcludeList( filterNulls( actualExcludes ),
return new IncludeExcludeList(
filterNulls( filterClasses (
actualExcludes ) ),
filterNulls ( getExcludedMethods(
getMethodFilterInIncludesExcludes( actualExcludes ) ) ) );
}

private List<String> filterClasses( List<String> excludes )
{
List<String> filter = new LinkedList<>();
for ( String exclude : excludes )
{
if ( exclude != null && !exclude.contains ( "#" ) )
{
filter.add( exclude );
}
}
return filter;
}

private List<String> getExcludedMethods( List<String> methodFilterInIncludesExcludes )
{
List<String> excludedMethods = new LinkedList<>();
Expand Down