Package io.camunda.zeebe
Class ZeebeConsoleOutputFileReporter
java.lang.Object
io.camunda.zeebe.ZeebeConsoleOutputFileReporter
- All Implemented Interfaces:
org.apache.maven.surefire.extensions.ConsoleOutputReportEventListener
public final class ZeebeConsoleOutputFileReporter
extends Object
implements org.apache.maven.surefire.extensions.ConsoleOutputReportEventListener
A
ConsoleOutputReportEventListener which will save a test's previous run's output instead
of overwriting it. This is somewhat hacky, as the canonical implementation ConsoleOutputFileReporter is not really extensible. So instead we "predict" the output path that
it will use, and if it was present, we copy it in order to preserve it. If we see that the
canonical implementation changes too much, then we could simply make our own to stabilize things,
but for now I think this is acceptable.
By using this implementation, it now works like this:
- All calls are delegated to an instance of the canonical implementation
- When
writeTestOutput(TestOutputReportEntry)is called, we predict the path by callingFileReporter.getReportFile(File, String, String, String)via reflection just like the canonical implementation does - If a file exists at this path, extract the latest run count from the other existing files; we opted against keeping an in-memory cache, as on long builds this could use too much memory
-
Constructor Summary
ConstructorsConstructorDescriptionZeebeConsoleOutputFileReporter(File reportsDirectory, String reportNameSuffix, boolean usePhrasedFileName, Integer forkNumber, org.apache.maven.surefire.extensions.ConsoleOutputReportEventListener delegate) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()voidtestSetCompleted(org.apache.maven.surefire.api.report.TestSetReportEntry report) voidtestSetStarting(org.apache.maven.surefire.api.report.TestSetReportEntry reportEntry) voidwriteTestOutput(org.apache.maven.surefire.api.report.TestOutputReportEntry reportEntry)
-
Constructor Details
-
ZeebeConsoleOutputFileReporter
-
-
Method Details
-
testSetStarting
public void testSetStarting(org.apache.maven.surefire.api.report.TestSetReportEntry reportEntry) - Specified by:
testSetStartingin interfaceorg.apache.maven.surefire.extensions.ConsoleOutputReportEventListener
-
testSetCompleted
public void testSetCompleted(org.apache.maven.surefire.api.report.TestSetReportEntry report) - Specified by:
testSetCompletedin interfaceorg.apache.maven.surefire.extensions.ConsoleOutputReportEventListener
-
close
public void close()- Specified by:
closein interfaceorg.apache.maven.surefire.extensions.ConsoleOutputReportEventListener
-
writeTestOutput
public void writeTestOutput(org.apache.maven.surefire.api.report.TestOutputReportEntry reportEntry) - Specified by:
writeTestOutputin interfaceorg.apache.maven.surefire.extensions.ConsoleOutputReportEventListener
-