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.suite.RunResult;
26
27
28
29
30
31
32
33
34
35 public class ForkingReporterFactory
36 implements ReporterFactory
37 {
38
39 private final Boolean isTrimstackTrace;
40
41 private final PrintStream originalSystemOut;
42
43 private volatile int testSetChannelId = 1;
44
45 public ForkingReporterFactory( Boolean trimstackTrace, PrintStream originalSystemOut )
46 {
47 isTrimstackTrace = trimstackTrace;
48 this.originalSystemOut = originalSystemOut;
49 }
50
51 public synchronized RunListener createReporter()
52 {
53 return new ForkingRunListener( originalSystemOut, testSetChannelId++, isTrimstackTrace.booleanValue() );
54 }
55
56 public RunResult close()
57 {
58 return new RunResult( 17, 17, 17, 17 );
59 }
60 }