[Git][java-team/surefire][upstream] New upstream version 2.22.2
Emmanuel Bourg
gitlab at salsa.debian.org
Fri Jul 12 00:14:04 BST 2019
Emmanuel Bourg pushed to branch upstream at Debian Java Maintainers / surefire
Commits:
5e0fc0ae by Emmanuel Bourg at 2019-07-11T23:04:51Z
New upstream version 2.22.2
- - - - -
30 changed files:
- − .travis.yml
- maven-failsafe-plugin/pom.xml
- maven-surefire-common/pom.xml
- maven-surefire-plugin/pom.xml
- maven-surefire-report-plugin/pom.xml
- pom.xml
- surefire-api/pom.xml
- surefire-booter/pom.xml
- surefire-grouper/pom.xml
- surefire-its/pom.xml
- surefire-its/src/test/java/org/apache/maven/surefire/its/JUnitPlatformEnginesIT.java
- + surefire-its/src/test/java/org/apache/maven/surefire/its/JUnitPlatformStreamCorruptionIT.java
- + surefire-its/src/test/resources/surefire-1614-stream-corruption/pom.xml
- + surefire-its/src/test/resources/surefire-1614-stream-corruption/src/test/java/com/example/demo/CustomRunner.java
- + surefire-its/src/test/resources/surefire-1614-stream-corruption/src/test/java/com/example/demo/SurefireStreamCorruptionTest.java
- surefire-logger-api/pom.xml
- surefire-providers/common-java5/pom.xml
- surefire-providers/common-junit3/pom.xml
- surefire-providers/common-junit4/pom.xml
- surefire-providers/common-junit48/pom.xml
- surefire-providers/pom.xml
- surefire-providers/surefire-junit-platform/pom.xml
- surefire-providers/surefire-junit-platform/src/main/java/org/apache/maven/surefire/junitplatform/JUnitPlatformProvider.java
- surefire-providers/surefire-junit3/pom.xml
- surefire-providers/surefire-junit4/pom.xml
- surefire-providers/surefire-junit47/pom.xml
- surefire-providers/surefire-testng-utils/pom.xml
- surefire-providers/surefire-testng/pom.xml
- surefire-report-parser/pom.xml
- surefire-shadefire/pom.xml
Changes:
=====================================
.travis.yml deleted
=====================================
@@ -1,12 +0,0 @@
-language: java
-jdk:
- - oraclejdk8
-# - oraclejdk9
-
-script: "rm -rf .repository && mvn --show-version --errors --batch-mode -Prun-its clean install -Dmaven.repo.local=.repository -Denforcer.skip=true -e"
-
-install: true
-
-branches:
- except:
- - gh-pages
=====================================
maven-failsafe-plugin/pom.xml
=====================================
@@ -24,7 +24,7 @@
<parent>
<groupId>org.apache.maven.surefire</groupId>
<artifactId>surefire</artifactId>
- <version>2.22.1</version>
+ <version>2.22.2</version>
</parent>
<groupId>org.apache.maven.plugins</groupId>
=====================================
maven-surefire-common/pom.xml
=====================================
@@ -24,7 +24,7 @@
<parent>
<groupId>org.apache.maven.surefire</groupId>
<artifactId>surefire</artifactId>
- <version>2.22.1</version>
+ <version>2.22.2</version>
</parent>
<artifactId>maven-surefire-common</artifactId>
=====================================
maven-surefire-plugin/pom.xml
=====================================
@@ -24,7 +24,7 @@
<parent>
<groupId>org.apache.maven.surefire</groupId>
<artifactId>surefire</artifactId>
- <version>2.22.1</version>
+ <version>2.22.2</version>
</parent>
<groupId>org.apache.maven.plugins</groupId>
=====================================
maven-surefire-report-plugin/pom.xml
=====================================
@@ -24,7 +24,7 @@
<parent>
<groupId>org.apache.maven.surefire</groupId>
<artifactId>surefire</artifactId>
- <version>2.22.1</version>
+ <version>2.22.2</version>
</parent>
<groupId>org.apache.maven.plugins</groupId>
=====================================
pom.xml
=====================================
@@ -28,7 +28,7 @@
<groupId>org.apache.maven.surefire</groupId>
<artifactId>surefire</artifactId>
- <version>2.22.1</version>
+ <version>2.22.2</version>
<packaging>pom</packaging>
<name>Apache Maven Surefire</name>
@@ -66,7 +66,7 @@
<connection>${maven.surefire.scm.devConnection}</connection>
<developerConnection>${maven.surefire.scm.devConnection}</developerConnection>
<url>https://github.com/apache/maven-surefire/tree/${project.scm.tag}</url>
- <tag>surefire-2.22.1_vote-1</tag>
+ <tag>surefire-2.22.2</tag>
</scm>
<issueManagement>
<system>jira</system>
=====================================
surefire-api/pom.xml
=====================================
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.maven.surefire</groupId>
<artifactId>surefire</artifactId>
- <version>2.22.1</version>
+ <version>2.22.2</version>
</parent>
<artifactId>surefire-api</artifactId>
=====================================
surefire-booter/pom.xml
=====================================
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.maven.surefire</groupId>
<artifactId>surefire</artifactId>
- <version>2.22.1</version>
+ <version>2.22.2</version>
</parent>
<artifactId>surefire-booter</artifactId>
=====================================
surefire-grouper/pom.xml
=====================================
@@ -24,7 +24,7 @@
<parent>
<groupId>org.apache.maven.surefire</groupId>
<artifactId>surefire</artifactId>
- <version>2.22.1</version>
+ <version>2.22.2</version>
</parent>
<artifactId>surefire-grouper</artifactId>
=====================================
surefire-its/pom.xml
=====================================
@@ -24,7 +24,7 @@
<parent>
<groupId>org.apache.maven.surefire</groupId>
<artifactId>surefire</artifactId>
- <version>2.22.1</version>
+ <version>2.22.2</version>
</parent>
<artifactId>surefire-its</artifactId>
=====================================
surefire-its/src/test/java/org/apache/maven/surefire/its/JUnitPlatformEnginesIT.java
=====================================
@@ -63,7 +63,6 @@
args.add( new Object[] { "1.1.1", "5.1.1", "1.0.0", "1.0.0" } );
args.add( new Object[] { "1.2.0", "5.2.0", "1.1.0", "1.0.0" } );
args.add( new Object[] { "1.3.1", "5.3.1", "1.1.1", "1.0.0" } );
- args.add( new Object[] { "1.4.0-SNAPSHOT", "5.4.0-SNAPSHOT", "1.1.1", "1.0.0" } );
return args;
}
=====================================
surefire-its/src/test/java/org/apache/maven/surefire/its/JUnitPlatformStreamCorruptionIT.java
=====================================
@@ -0,0 +1,56 @@
+package org.apache.maven.surefire.its;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.apache.maven.it.VerificationException;
+import org.apache.maven.surefire.its.fixture.OutputValidator;
+import org.apache.maven.surefire.its.fixture.SurefireJUnit4IntegrationTestCase;
+import org.junit.Before;
+import org.junit.Test;
+
+import java.util.List;
+
+import static org.apache.maven.surefire.its.fixture.HelperAssertions.assumeJavaVersion;
+import static org.fest.assertions.Assertions.assertThat;
+import static org.hamcrest.CoreMatchers.startsWith;
+
+public class JUnitPlatformStreamCorruptionIT
+ extends SurefireJUnit4IntegrationTestCase
+{
+ @Before
+ public void setUp()
+ {
+ assumeJavaVersion( 1.8d );
+ }
+
+ @Test
+ public void warningIsNotEmitted() throws VerificationException
+ {
+ OutputValidator validator = unpack( "/surefire-1614-stream-corruption" )
+ .executeTest()
+ .verifyErrorFree( 1 );
+
+ List<String> lines = validator.loadLogLines(
+ startsWith( "[WARNING] Corrupted STDOUT by directly writing to native stream in forked JVM" ) );
+
+ assertThat( lines )
+ .isEmpty();
+ }
+}
=====================================
surefire-its/src/test/resources/surefire-1614-stream-corruption/pom.xml
=====================================
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.apache.maven.plugins.surefire</groupId>
+ <artifactId>junit-platform-1.0.0</artifactId>
+ <version>1.0</version>
+ <name>[SUREFIRE-1614] JUnit 5: Vintage Output Stream Corruption</name>
+
+ <properties>
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+ <maven.compiler.source>1.8</maven.compiler.source>
+ <maven.compiler.target>1.8</maven.compiler.target>
+ </properties>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.junit.vintage</groupId>
+ <artifactId>junit-vintage-engine</artifactId>
+ <version>5.3.2</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <version>${surefire.version}</version>
+ </plugin>
+ </plugins>
+ </build>
+
+</project>
=====================================
surefire-its/src/test/resources/surefire-1614-stream-corruption/src/test/java/com/example/demo/CustomRunner.java
=====================================
@@ -0,0 +1,22 @@
+package com.example.demo;
+
+import org.junit.runners.BlockJUnit4ClassRunner;
+import org.junit.runners.model.InitializationError;
+import org.junit.runners.model.TestClass;
+
+public class CustomRunner
+ extends BlockJUnit4ClassRunner
+{
+
+ public CustomRunner( Class<?> klass ) throws InitializationError
+ {
+ super( klass );
+ }
+
+ @Override
+ protected TestClass createTestClass( Class<?> testClass )
+ {
+ System.out.println( "Creating test class" );
+ return super.createTestClass( testClass );
+ }
+}
=====================================
surefire-its/src/test/resources/surefire-1614-stream-corruption/src/test/java/com/example/demo/SurefireStreamCorruptionTest.java
=====================================
@@ -0,0 +1,13 @@
+package com.example.demo;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+ at RunWith( CustomRunner.class )
+public class SurefireStreamCorruptionTest
+{
+ @Test
+ public void contextLoads()
+ {
+ }
+}
=====================================
surefire-logger-api/pom.xml
=====================================
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.maven.surefire</groupId>
<artifactId>surefire</artifactId>
- <version>2.22.1</version>
+ <version>2.22.2</version>
</parent>
<artifactId>surefire-logger-api</artifactId>
=====================================
surefire-providers/common-java5/pom.xml
=====================================
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.maven.surefire</groupId>
<artifactId>surefire-providers</artifactId>
- <version>2.22.1</version>
+ <version>2.22.2</version>
</parent>
<artifactId>common-java5</artifactId>
=====================================
surefire-providers/common-junit3/pom.xml
=====================================
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.maven.surefire</groupId>
<artifactId>surefire-providers</artifactId>
- <version>2.22.1</version>
+ <version>2.22.2</version>
</parent>
<artifactId>common-junit3</artifactId>
=====================================
surefire-providers/common-junit4/pom.xml
=====================================
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.maven.surefire</groupId>
<artifactId>surefire-providers</artifactId>
- <version>2.22.1</version>
+ <version>2.22.2</version>
</parent>
<artifactId>common-junit4</artifactId>
=====================================
surefire-providers/common-junit48/pom.xml
=====================================
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.maven.surefire</groupId>
<artifactId>surefire-providers</artifactId>
- <version>2.22.1</version>
+ <version>2.22.2</version>
</parent>
<artifactId>common-junit48</artifactId>
=====================================
surefire-providers/pom.xml
=====================================
@@ -24,7 +24,7 @@
<parent>
<groupId>org.apache.maven.surefire</groupId>
<artifactId>surefire</artifactId>
- <version>2.22.1</version>
+ <version>2.22.2</version>
</parent>
<artifactId>surefire-providers</artifactId>
=====================================
surefire-providers/surefire-junit-platform/pom.xml
=====================================
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.maven.surefire</groupId>
<artifactId>surefire-providers</artifactId>
- <version>2.22.1</version>
+ <version>2.22.2</version>
</parent>
<artifactId>surefire-junit-platform</artifactId>
=====================================
surefire-providers/surefire-junit-platform/src/main/java/org/apache/maven/surefire/junitplatform/JUnitPlatformProvider.java
=====================================
@@ -27,6 +27,8 @@
import static java.util.stream.Collectors.toList;
import static org.apache.maven.surefire.booter.ProviderParameterNames.TESTNG_EXCLUDEDGROUPS_PROP;
import static org.apache.maven.surefire.booter.ProviderParameterNames.TESTNG_GROUPS_PROP;
+import static org.apache.maven.surefire.report.ConsoleOutputCapture.startCapture;
+import static org.apache.maven.surefire.util.TestsToRun.fromClass;
import static org.junit.platform.commons.util.StringUtils.isBlank;
import static org.junit.platform.engine.discovery.DiscoverySelectors.selectClass;
import static org.junit.platform.launcher.core.LauncherDiscoveryRequestBuilder.request;
@@ -44,7 +46,6 @@
import org.apache.maven.surefire.providerapi.AbstractProvider;
import org.apache.maven.surefire.providerapi.ProviderParameters;
-import org.apache.maven.surefire.report.ConsoleOutputCapture;
import org.apache.maven.surefire.report.ConsoleOutputReceiver;
import org.apache.maven.surefire.report.ReporterException;
import org.apache.maven.surefire.report.ReporterFactory;
@@ -104,22 +105,35 @@ public JUnitPlatformProvider( ProviderParameters parameters )
public RunResult invoke( Object forkTestSet )
throws TestSetFailedException, ReporterException
{
- if ( forkTestSet instanceof TestsToRun )
- {
- return invokeAllTests( (TestsToRun) forkTestSet );
- }
- else if ( forkTestSet instanceof Class )
- {
- return invokeAllTests( TestsToRun.fromClass( (Class<?>) forkTestSet ) );
- }
- else if ( forkTestSet == null )
+ ReporterFactory reporterFactory = parameters.getReporterFactory();
+ final RunResult runResult;
+ try
{
- return invokeAllTests( scanClasspath() );
+ RunListener runListener = reporterFactory.createReporter();
+ startCapture( ( ConsoleOutputReceiver ) runListener );
+ if ( forkTestSet instanceof TestsToRun )
+ {
+ invokeAllTests( (TestsToRun) forkTestSet, runListener );
+ }
+ else if ( forkTestSet instanceof Class )
+ {
+ invokeAllTests( fromClass( ( Class<?> ) forkTestSet ), runListener );
+ }
+ else if ( forkTestSet == null )
+ {
+ invokeAllTests( scanClasspath(), runListener );
+ }
+ else
+ {
+ throw new IllegalArgumentException(
+ "Unexpected value of forkTestSet: " + forkTestSet );
+ }
}
- else
+ finally
{
- throw new IllegalArgumentException( "Unexpected value of forkTestSet: " + forkTestSet );
+ runResult = reporterFactory.close();
}
+ return runResult;
}
private TestsToRun scanClasspath()
@@ -130,22 +144,10 @@ private TestsToRun scanClasspath()
return parameters.getRunOrderCalculator().orderTestClasses( scannedClasses );
}
- private RunResult invokeAllTests( TestsToRun testsToRun )
+ private void invokeAllTests( TestsToRun testsToRun, RunListener runListener )
{
- RunResult runResult;
- ReporterFactory reporterFactory = parameters.getReporterFactory();
- try
- {
- RunListener runListener = reporterFactory.createReporter();
- ConsoleOutputCapture.startCapture( (ConsoleOutputReceiver) runListener );
- LauncherDiscoveryRequest discoveryRequest = buildLauncherDiscoveryRequest( testsToRun );
- launcher.execute( discoveryRequest, new RunListenerAdapter( runListener ) );
- }
- finally
- {
- runResult = reporterFactory.close();
- }
- return runResult;
+ LauncherDiscoveryRequest discoveryRequest = buildLauncherDiscoveryRequest( testsToRun );
+ launcher.execute( discoveryRequest, new RunListenerAdapter( runListener ) );
}
private LauncherDiscoveryRequest buildLauncherDiscoveryRequest( TestsToRun testsToRun )
=====================================
surefire-providers/surefire-junit3/pom.xml
=====================================
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.maven.surefire</groupId>
<artifactId>surefire-providers</artifactId>
- <version>2.22.1</version>
+ <version>2.22.2</version>
</parent>
<artifactId>surefire-junit3</artifactId>
=====================================
surefire-providers/surefire-junit4/pom.xml
=====================================
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.maven.surefire</groupId>
<artifactId>surefire-providers</artifactId>
- <version>2.22.1</version>
+ <version>2.22.2</version>
</parent>
<artifactId>surefire-junit4</artifactId>
=====================================
surefire-providers/surefire-junit47/pom.xml
=====================================
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.maven.surefire</groupId>
<artifactId>surefire-providers</artifactId>
- <version>2.22.1</version>
+ <version>2.22.2</version>
</parent>
<artifactId>surefire-junit47</artifactId>
=====================================
surefire-providers/surefire-testng-utils/pom.xml
=====================================
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.maven.surefire</groupId>
<artifactId>surefire-providers</artifactId>
- <version>2.22.1</version>
+ <version>2.22.2</version>
</parent>
<artifactId>surefire-testng-utils</artifactId>
=====================================
surefire-providers/surefire-testng/pom.xml
=====================================
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.maven.surefire</groupId>
<artifactId>surefire-providers</artifactId>
- <version>2.22.1</version>
+ <version>2.22.2</version>
</parent>
<artifactId>surefire-testng</artifactId>
=====================================
surefire-report-parser/pom.xml
=====================================
@@ -24,7 +24,7 @@
<parent>
<groupId>org.apache.maven.surefire</groupId>
<artifactId>surefire</artifactId>
- <version>2.22.1</version>
+ <version>2.22.2</version>
</parent>
<artifactId>surefire-report-parser</artifactId>
=====================================
surefire-shadefire/pom.xml
=====================================
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.maven.surefire</groupId>
<artifactId>surefire</artifactId>
- <version>2.22.1</version>
+ <version>2.22.2</version>
</parent>
<artifactId>surefire-shadefire</artifactId>
View it on GitLab: https://salsa.debian.org/java-team/surefire/commit/5e0fc0ae1dd68722558e1a8eceb90b6d3d4a8742
--
View it on GitLab: https://salsa.debian.org/java-team/surefire/commit/5e0fc0ae1dd68722558e1a8eceb90b6d3d4a8742
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-java-commits/attachments/20190711/cc7e47fe/attachment.html>
More information about the pkg-java-commits
mailing list