1 package org.apache.maven.surefire.booter;
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22 import java.io.PrintStream;
23 import org.apache.maven.surefire.report.ReporterFactory;
24 import org.apache.maven.surefire.report.RunListener;
25 import org.apache.maven.surefire.report.RunStatistics;
26 import org.apache.maven.surefire.suite.RunResult;
27
28
29
30
31
32
33
34
35
36 public class ForkingReporterFactory
37 implements ReporterFactory
38 {
39
40 private final Boolean isTrimstackTrace;
41
42 private final PrintStream originalSystemOut;
43
44 private volatile int testSetChannelId = 1;
45
46 public ForkingReporterFactory( Boolean trimstackTrace, PrintStream originalSystemOut )
47 {
48 isTrimstackTrace = trimstackTrace;
49 this.originalSystemOut = originalSystemOut;
50 }
51
52 public synchronized RunListener createReporter()
53 {
54 return new ForkingRunListener( originalSystemOut, testSetChannelId++, isTrimstackTrace.booleanValue() );
55 }
56
57 public RunResult close()
58 {
59 return new RunResult( 17, 17, 17, 17 );
60 }
61
62 public RunStatistics getGlobalRunStatistics()
63 {
64 return new RunStatistics();
65 }
66
67 }