1 package org.apache.maven.surefire.junitcore;
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22 import org.apache.maven.surefire.report.ReporterConfiguration;
23 import org.apache.maven.surefire.report.ReporterFactory;
24 import org.apache.maven.surefire.testset.TestSetFailedException;
25
26 import java.util.Map;
27
28
29
30
31 public class ClassesParallelRunListener
32 extends ConcurrentReporterManager
33 {
34 public ClassesParallelRunListener( Map<String, TestSet> classMethodCounts, ReporterFactory reporterFactory,
35 ReporterConfiguration reporterConfiguration )
36 throws TestSetFailedException
37 {
38 super( reporterFactory, false, reporterConfiguration, classMethodCounts );
39 }
40
41 @Override
42 public void checkIfTestSetCanBeReported( TestSet testSetForTest )
43 {
44 TestSet currentlyAttached = TestSet.getThreadTestSet();
45 if ( currentlyAttached != null && currentlyAttached != testSetForTest )
46 {
47 currentlyAttached.setAllScheduled( getReporterManager() );
48 }
49 }
50 }