use of org.apache.maven.surefire.common.junit4.JUnit4StackTraceWriter in project ignite by apache.
the class IgniteTestsProvider method writeFailureToOutput.
/**
* Make info about non-suited test visible to user.
*/
private void writeFailureToOutput(Failure failure) throws TestSetFailedException {
try {
SimpleReportEntry report = SimpleReportEntry.withException(failure.getDescription().getClassName(), null, failure.getDescription().getMethodName(), null, new JUnit4StackTraceWriter(failure));
RunListener reporter = reporterFactory.createReporter();
startCapture((ConsoleOutputReceiver) reporter);
reporter.testFailed(report);
reporter.testSetCompleted(report);
} catch (Exception e) {
throw new TestSetFailedException("Failed to dump exception to stdout");
}
}
Aggregations