a540520012
This is an automated DistroBaker update from upstream sources. If you do not know what this is about or would like to opt out, contact the OSCI team. Source: https://src.fedoraproject.org/rpms/maven-surefire.git#99d8deada2b8277c4308723f604e0c08a0c9a120
95 lines
5.4 KiB
Diff
95 lines
5.4 KiB
Diff
diff --git a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/report/StatelessXmlReporter.java b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/report/StatelessXmlReporter.java
|
|
index fcb066e..bfe894e 100644
|
|
--- a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/report/StatelessXmlReporter.java
|
|
+++ b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/report/StatelessXmlReporter.java
|
|
@@ -200,7 +200,7 @@ public class StatelessXmlReporter
|
|
}
|
|
|
|
private void serializeTestClass( OutputStream outputStream, OutputStreamWriter fw, XMLWriter ppw,
|
|
- List<WrappedReportEntry> methodEntries )
|
|
+ List<WrappedReportEntry> methodEntries ) throws IOException
|
|
{
|
|
if ( rerunFailingTestsCount > 0 )
|
|
{
|
|
@@ -215,7 +215,7 @@ public class StatelessXmlReporter
|
|
}
|
|
|
|
private void serializeTestClassWithoutRerun( OutputStream outputStream, OutputStreamWriter fw, XMLWriter ppw,
|
|
- List<WrappedReportEntry> methodEntries )
|
|
+ List<WrappedReportEntry> methodEntries ) throws IOException
|
|
{
|
|
for ( WrappedReportEntry methodEntry : methodEntries )
|
|
{
|
|
@@ -231,7 +231,7 @@ public class StatelessXmlReporter
|
|
}
|
|
|
|
private void serializeTestClassWithRerun( OutputStream outputStream, OutputStreamWriter fw, XMLWriter ppw,
|
|
- List<WrappedReportEntry> methodEntries )
|
|
+ List<WrappedReportEntry> methodEntries ) throws IOException
|
|
{
|
|
WrappedReportEntry firstMethodEntry = methodEntries.get( 0 );
|
|
switch ( getTestResultType( methodEntries ) )
|
|
@@ -369,7 +369,7 @@ public class StatelessXmlReporter
|
|
return new File( reportsDirectory, stripIllegalFilenameChars( customizedReportName + ".xml" ) );
|
|
}
|
|
|
|
- private void startTestElement( XMLWriter ppw, WrappedReportEntry report )
|
|
+ private void startTestElement( XMLWriter ppw, WrappedReportEntry report ) throws IOException
|
|
{
|
|
ppw.startElement( "testcase" );
|
|
String name = phrasedMethodName ? report.getReportName() : report.getName();
|
|
@@ -390,7 +390,7 @@ public class StatelessXmlReporter
|
|
ppw.addAttribute( "time", report.elapsedTimeAsString() );
|
|
}
|
|
|
|
- private void createTestSuiteElement( XMLWriter ppw, WrappedReportEntry report, TestSetStats testSetStats )
|
|
+ private void createTestSuiteElement( XMLWriter ppw, WrappedReportEntry report, TestSetStats testSetStats ) throws IOException
|
|
{
|
|
ppw.startElement( "testsuite" );
|
|
|
|
@@ -420,7 +420,7 @@ public class StatelessXmlReporter
|
|
|
|
private static void getTestProblems( OutputStreamWriter outputStreamWriter, XMLWriter ppw,
|
|
WrappedReportEntry report, boolean trimStackTrace, OutputStream fw,
|
|
- String testErrorType, boolean createOutErrElementsInside )
|
|
+ String testErrorType, boolean createOutErrElementsInside ) throws IOException
|
|
{
|
|
ppw.startElement( testErrorType );
|
|
|
|
@@ -477,7 +477,7 @@ public class StatelessXmlReporter
|
|
|
|
// Create system-out and system-err elements
|
|
private static void createOutErrElements( OutputStreamWriter outputStreamWriter, XMLWriter ppw,
|
|
- WrappedReportEntry report, OutputStream fw )
|
|
+ WrappedReportEntry report, OutputStream fw ) throws IOException
|
|
{
|
|
EncodingOutputStream eos = new EncodingOutputStream( fw );
|
|
addOutputStreamElement( outputStreamWriter, eos, ppw, report.getStdout(), "system-out" );
|
|
@@ -487,7 +487,7 @@ public class StatelessXmlReporter
|
|
private static void addOutputStreamElement( OutputStreamWriter outputStreamWriter,
|
|
EncodingOutputStream eos, XMLWriter xmlWriter,
|
|
Utf8RecodingDeferredFileOutputStream utf8RecodingDeferredFileOutputStream,
|
|
- String name )
|
|
+ String name ) throws IOException
|
|
{
|
|
if ( utf8RecodingDeferredFileOutputStream != null && utf8RecodingDeferredFileOutputStream.getByteCount() > 0 )
|
|
{
|
|
@@ -517,7 +517,7 @@ public class StatelessXmlReporter
|
|
*
|
|
* @param xmlWriter The test suite to report to
|
|
*/
|
|
- private static void showProperties( XMLWriter xmlWriter, Map<String, String> systemProperties )
|
|
+ private static void showProperties( XMLWriter xmlWriter, Map<String, String> systemProperties ) throws IOException
|
|
{
|
|
xmlWriter.startElement( "properties" );
|
|
for ( final Entry<String, String> entry : systemProperties.entrySet() )
|
|
@@ -559,7 +559,7 @@ public class StatelessXmlReporter
|
|
* @param message The string
|
|
*/
|
|
private static void extraEscapeElementValue( String message, OutputStreamWriter outputStreamWriter,
|
|
- XMLWriter xmlWriter, OutputStream fw )
|
|
+ XMLWriter xmlWriter, OutputStream fw ) throws IOException
|
|
{
|
|
// Someday convert to xml 1.1 which handles everything but 0 inside string
|
|
if ( containsEscapesIllegalXml10( message ) )
|