Github user mpkorstanje commented on the issue:
https://github.com/apache/maven-surefire/pull/150
@Tibor17 that should be doable. Replacing the inner most loop in the
`JUnit4Provider.executeWithRerun` with the code below should do it. This would
require the `FilterFactory` to be moved to another common module. I can't
quite tell what the the nock-on effects of that would be.
```java
for ( int i = 0; i < rerunFailingTestsCount &&
!failureListener.getAllFailures().isEmpty(); i++ )
{
Set<Description> failures = generateFailingTestDescriptions(
failureListener.getAllFailures() );
failureListener.reset();
FilterFactory filterFactory = new FilterFactory( testClassLoader );
Filter failingMethodsFilter =
filterFactory.createMatchMethodDescriptionsFilter( failures );
Request.aClass( clazz ).filterWith( failingMethodsFilter
).getRunner().run( rerunNotifier );
}
```
---