You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by ti...@apache.org on 2022/01/24 00:52:52 UTC
[maven-surefire] branch release/2.22.3 updated (8f02db1 -> 8ef8bc0)
This is an automated email from the ASF dual-hosted git repository.
tibordigana pushed a change to branch release/2.22.3
in repository https://gitbox.apache.org/repos/asf/maven-surefire.git.
discard 8f02db1 jdk1.7 build fix with m-compiler-p:3.9.0
discard f2db744 [SUREFIRE-1913] system properties should be restored after the in-process tests have been executed
discard cbaaa09 [SUREFIRE-1912] user.dir should not be set lazily within the surefire fork JVM
discard 92b65de [SUREFIRE-1908] Wish by Stackoverflow - Documented strategy with parallel Java packages
discard d44dd1d [SUREFIRE-1865] ChecksumCalculator getSha1 does not compute checksums correctly
discard bb839bb enabled and fixed tests in surefire-junit-platform
discard e29b956 [SUREFIRE-1983] Corrupted STDOUT by directly writing to native stream in forked JVM 1. [setupJunitLogger() should be called AFTER startCapture()]
discard bc46847 [jenkinsci] windows-he, Maven 3.2.x and 3.5.x; JDK 7,8,11
new aeb65d2 [jenkinsci] windows-he, JDK 7,8,11
new 8ca99dd [SUREFIRE-1983] Corrupted STDOUT by directly writing to native stream in forked JVM 1. [setupJunitLogger() should be called AFTER startCapture()]
new 4ec11cb enabled and fixed tests in surefire-junit-platform
new f780438 [SUREFIRE-1865] ChecksumCalculator getSha1 does not compute checksums correctly
new 643d203 [SUREFIRE-1908] Wish by Stackoverflow - Documented strategy with parallel Java packages
new 8eb5c54 [SUREFIRE-1912] user.dir should not be set lazily within the surefire fork JVM
new 9eb2d91 [SUREFIRE-1913] system properties should be restored after the in-process tests have been executed
new 8ef8bc0 jdk1.7 build fix with m-compiler-p:3.9.0
This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version. This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:
* -- * -- B -- O -- O -- O (8f02db1)
\
N -- N -- N refs/heads/release/2.22.3 (8ef8bc0)
You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.
Any revisions marked "omit" are not gone; other references still
refer to them. Any revisions marked "discard" are gone forever.
The 8 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
[maven-surefire] 04/08: [SUREFIRE-1865] ChecksumCalculator getSha1 does not compute checksums correctly
Posted by ti...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
tibordigana pushed a commit to branch release/2.22.3
in repository https://gitbox.apache.org/repos/asf/maven-surefire.git
commit f780438672a5bedd73857e4de33756963cd3676d
Author: Gian Merlino <gi...@gmail.com>
AuthorDate: Sun Dec 6 02:09:44 2020 +0100
[SUREFIRE-1865] ChecksumCalculator getSha1 does not compute checksums correctly
Two changes:
1) Fix length computation to use bytes, not characters.
2) Use UTF_8 instead of ISO_8859_1 for encoding, because configs can contain
characters that fall outside the ISO_8859_1 character set.
(cherry picked from commit 1da3462303afe17c030cb884953f11133b8b4796)
---
.../surefire/booterclient/ChecksumCalculator.java | 5 +--
.../booterclient/ChecksumCalculatorTest.java | 38 ++++++++++++++++++++++
.../org/apache/maven/surefire/JUnit4SuiteTest.java | 2 ++
3 files changed, 43 insertions(+), 2 deletions(-)
diff --git a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/ChecksumCalculator.java b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/ChecksumCalculator.java
index 5931f9e..5f32be1 100644
--- a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/ChecksumCalculator.java
+++ b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/ChecksumCalculator.java
@@ -29,7 +29,7 @@ import java.util.ArrayList;
import java.util.List;
import java.util.Map;
-import static org.apache.maven.surefire.util.internal.StringUtils.ISO_8859_1;
+import static org.apache.maven.surefire.util.internal.StringUtils.UTF_8;
/**
* @author Kristian Rosenvold
@@ -155,7 +155,8 @@ public class ChecksumCalculator
{
MessageDigest md = MessageDigest.getInstance( "SHA-1" );
String configValue = getConfig();
- md.update( configValue.getBytes( ISO_8859_1 ), 0, configValue.length() );
+ byte[] configBytes = configValue.getBytes( UTF_8 );
+ md.update( configBytes );
byte[] sha1hash = md.digest();
return asHexString( sha1hash );
}
diff --git a/maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/booterclient/ChecksumCalculatorTest.java b/maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/booterclient/ChecksumCalculatorTest.java
new file mode 100644
index 0000000..e5b91d3
--- /dev/null
+++ b/maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/booterclient/ChecksumCalculatorTest.java
@@ -0,0 +1,38 @@
+package org.apache.maven.plugin.surefire.booterclient;
+
+/*
+ * 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.junit.Test;
+
+import static org.junit.Assert.assertEquals;
+
+/**
+ * Tests for {@link ChecksumCalculator}.
+ */
+public class ChecksumCalculatorTest
+{
+ @Test
+ public void testGetSha1()
+ {
+ final ChecksumCalculator calculator = new ChecksumCalculator();
+ calculator.add( "foö 🔥 Россия 한국 中国" );
+ assertEquals( "3421557EBE66A4741CA51C8D610AB1AB41D1693B", calculator.getSha1() );
+ }
+}
diff --git a/maven-surefire-common/src/test/java/org/apache/maven/surefire/JUnit4SuiteTest.java b/maven-surefire-common/src/test/java/org/apache/maven/surefire/JUnit4SuiteTest.java
index 728cef3..faf04b1 100644
--- a/maven-surefire-common/src/test/java/org/apache/maven/surefire/JUnit4SuiteTest.java
+++ b/maven-surefire-common/src/test/java/org/apache/maven/surefire/JUnit4SuiteTest.java
@@ -31,6 +31,7 @@ import org.apache.maven.plugin.surefire.SurefireReflectorTest;
import org.apache.maven.plugin.surefire.SurefirePropertiesTest;
import org.apache.maven.plugin.surefire.booterclient.BooterDeserializerProviderConfigurationTest;
import org.apache.maven.plugin.surefire.booterclient.BooterDeserializerStartupConfigurationTest;
+import org.apache.maven.plugin.surefire.booterclient.ChecksumCalculatorTest;
import org.apache.maven.plugin.surefire.booterclient.DefaultForkConfigurationTest;
import org.apache.maven.plugin.surefire.booterclient.ForkConfigurationTest;
import org.apache.maven.plugin.surefire.booterclient.ForkingRunListenerTest;
@@ -95,6 +96,7 @@ public class JUnit4SuiteTest extends TestCase
}
suite.addTest( new JUnit4TestAdapter( ScannerUtilTest.class ) );
suite.addTest( new JUnit4TestAdapter( MojoMocklessTest.class ) );
+ suite.addTest( new JUnit4TestAdapter( ChecksumCalculatorTest.class ) );
return suite;
}
}
[maven-surefire] 02/08: [SUREFIRE-1983] Corrupted STDOUT by directly writing to native stream in forked JVM 1. [setupJunitLogger() should be called AFTER startCapture()]
Posted by ti...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
tibordigana pushed a commit to branch release/2.22.3
in repository https://gitbox.apache.org/repos/asf/maven-surefire.git
commit 8ca99dd046382784d8231741245cc24afcf06ead
Author: Tibor Digaňa <ti...@apache.org>
AuthorDate: Sun Jan 23 20:33:58 2022 +0100
[SUREFIRE-1983] Corrupted STDOUT by directly writing to native stream in forked JVM 1. [setupJunitLogger() should be called AFTER startCapture()]
---
.../maven/surefire/junitplatform/JUnitPlatformProvider.java | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/surefire-providers/surefire-junit-platform/src/main/java/org/apache/maven/surefire/junitplatform/JUnitPlatformProvider.java b/surefire-providers/surefire-junit-platform/src/main/java/org/apache/maven/surefire/junitplatform/JUnitPlatformProvider.java
index 10a5dfe..63d65c1 100644
--- a/surefire-providers/surefire-junit-platform/src/main/java/org/apache/maven/surefire/junitplatform/JUnitPlatformProvider.java
+++ b/surefire-providers/surefire-junit-platform/src/main/java/org/apache/maven/surefire/junitplatform/JUnitPlatformProvider.java
@@ -91,7 +91,6 @@ public class JUnitPlatformProvider
this.launcher = launcher;
filters = newFilters();
configurationParameters = newConfigurationParameters();
- Logger.getLogger( "org.junit" ).setLevel( WARNING );
}
@Override
@@ -110,6 +109,7 @@ public class JUnitPlatformProvider
{
RunListener runListener = reporterFactory.createReporter();
startCapture( ( ConsoleOutputReceiver ) runListener );
+ setupJunitLogger();
if ( forkTestSet instanceof TestsToRun )
{
invokeAllTests( (TestsToRun) forkTestSet, runListener );
@@ -135,6 +135,15 @@ public class JUnitPlatformProvider
return runResult;
}
+ private static void setupJunitLogger()
+ {
+ Logger logger = Logger.getLogger( "org.junit" );
+ if ( logger.getLevel() == null )
+ {
+ logger.setLevel( WARNING );
+ }
+ }
+
private TestsToRun scanClasspath()
{
TestPlanScannerFilter filter = new TestPlanScannerFilter( launcher, filters );
[maven-surefire] 06/08: [SUREFIRE-1912] user.dir should not be set lazily within the surefire fork JVM
Posted by ti...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
tibordigana pushed a commit to branch release/2.22.3
in repository https://gitbox.apache.org/repos/asf/maven-surefire.git
commit 8eb5c54d1e2ef1deda5b41a92901513941dbe313
Author: tibordigana <ti...@gmail.com>
AuthorDate: Tue May 4 21:54:02 2021 +0200
[SUREFIRE-1912] user.dir should not be set lazily within the surefire fork JVM
(cherry picked from commit dceea49f62582a2a2820a5fe72e22d65c45f23ed)
---
.../org/apache/maven/plugin/surefire/AbstractSurefireMojo.java | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/AbstractSurefireMojo.java b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/AbstractSurefireMojo.java
index 2e916d8..be4ffea 100644
--- a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/AbstractSurefireMojo.java
+++ b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/AbstractSurefireMojo.java
@@ -1090,7 +1090,6 @@ public abstract class AbstractSurefireMojo
getUserProperties(), sysProps );
result.setProperty( "basedir", getBasedir().getAbsolutePath() );
- result.setProperty( "user.dir", getWorkingDirectory().getAbsolutePath() );
result.setProperty( "localRepository", getLocalRepository().getBasedir() );
if ( isForking() )
{
@@ -1114,10 +1113,16 @@ public abstract class AbstractSurefireMojo
);
}
}
+ else
+ {
+ result.setProperty( "user.dir", getWorkingDirectory().getAbsolutePath() );
+ }
+
if ( getConsoleLogger().isDebugEnabled() )
{
showToLog( result, getConsoleLogger() );
}
+
return result;
}
[maven-surefire] 07/08: [SUREFIRE-1913] system properties should be restored after the in-process tests have been executed
Posted by ti...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
tibordigana pushed a commit to branch release/2.22.3
in repository https://gitbox.apache.org/repos/asf/maven-surefire.git
commit 9eb2d915845abd390e667d55232fa570d47228de
Author: tibordigana <ti...@gmail.com>
AuthorDate: Sat May 8 23:33:46 2021 +0200
[SUREFIRE-1913] system properties should be restored after the in-process tests have been executed
(cherry picked from commit e9e5193feee08230e934f5f0fbdc8f69eda0fb0c)
---
.../maven/plugin/surefire/AbstractSurefireMojo.java | 16 ++++++++++++----
1 file changed, 12 insertions(+), 4 deletions(-)
diff --git a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/AbstractSurefireMojo.java b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/AbstractSurefireMojo.java
index be4ffea..2aa6dd4 100644
--- a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/AbstractSurefireMojo.java
+++ b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/AbstractSurefireMojo.java
@@ -1167,11 +1167,19 @@ public abstract class AbstractSurefireMojo
if ( isNotForking() )
{
- createCopyAndReplaceForkNumPlaceholder( effectiveProperties, 1 ).copyToSystemProperties();
+ Properties originalSystemProperties = (Properties) System.getProperties().clone();
+ try
+ {
+ createCopyAndReplaceForkNumPlaceholder( effectiveProperties, 1 ).copyToSystemProperties();
- InPluginVMSurefireStarter surefireStarter =
- createInprocessStarter( provider, classLoaderConfiguration, runOrderParameters, scanResult );
- return surefireStarter.runSuitesInProcess( scanResult );
+ InPluginVMSurefireStarter surefireStarter =
+ createInprocessStarter( provider, classLoaderConfiguration, runOrderParameters, scanResult );
+ return surefireStarter.runSuitesInProcess( scanResult );
+ }
+ finally
+ {
+ System.setProperties( originalSystemProperties );
+ }
}
else
{
[maven-surefire] 05/08: [SUREFIRE-1908] Wish by Stackoverflow - Documented strategy with parallel Java packages
Posted by ti...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
tibordigana pushed a commit to branch release/2.22.3
in repository https://gitbox.apache.org/repos/asf/maven-surefire.git
commit 643d203be51c7df20500a5882e5bb42e1457a4b5
Author: V. Mark Lehky <ml...@switch.com>
AuthorDate: Thu Apr 15 12:05:18 2021 -0700
[SUREFIRE-1908] Wish by Stackoverflow - Documented strategy with parallel Java packages
(cherry picked from commit 27ef162711425807a3647dc33e8c5267566d46dc)
---
.../fork-options-and-parallel-execution.apt.vm | 64 ++++++++++++++++++++++
1 file changed, 64 insertions(+)
diff --git a/maven-surefire-plugin/src/site/apt/examples/fork-options-and-parallel-execution.apt.vm b/maven-surefire-plugin/src/site/apt/examples/fork-options-and-parallel-execution.apt.vm
index 1add809..fe9d2f6 100644
--- a/maven-surefire-plugin/src/site/apt/examples/fork-options-and-parallel-execution.apt.vm
+++ b/maven-surefire-plugin/src/site/apt/examples/fork-options-and-parallel-execution.apt.vm
@@ -181,6 +181,70 @@ Fork Options and Parallel Test Execution
See the keywords: <volatile>, <synchronized>, <<immutable>> and <final> in
{{{https://jcp.org/en/jsr/detail?id=133}Java Memory Model - JSR-133}}.
+* Parallel Test-Suite Execution
+
+ ${project.artifactId}'s notion of "suite" is related to
+ {{{https://github.com/junit-team/junit4/wiki/Aggregating-tests-in-suites}junit4 Suite}}.
+
+ For example, say your tests are laid out like this:
+
++---+
+src/test/java
++-features.areaA
+| +-SomeTest.java
+| +-AnotherTest.java
++-features.areaB
+| +-DifferentTest.java
+| +-OtherTest.java
++---+
+
+ You would add a TestSuite.java for each package, that would look something like:
+
++---+
+package features.areaA;
+
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
+
+@RunWith(Suite.class)
+@Suite.SuiteClasses({
+ SomeTest.class,
+ AnotherTest.class
+})
+public class TestSuite {
+}
++---+
+
+ and similarly for <<<package features.areaB>>>. You would then configure
+ ${project.artifactId} as follows:
+
++---+
+<plugin>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>${project.artifactId}</artifactId>
+ <version>${project.version}</version>
+ <configuration>
+ <includes>
+ <include>features.*.TestSuite</include>
+ </includes>
+ <parallel>suites</parallel>
+ <threadCountSuites>2</threadCountSuites>
+ <perCoreThreadCount>false</perCoreThreadCount>
+ </configuration>
+</plugin>
++---+
+
+ This would then run up to 2 threads, and each thread would be fed a TestSuite.class,
+ one at a time. The test classes within that Suite would be executed sequentially
+ in the order specified the Suite class.
+
+ Note that the <<<perCoreThreadCount>>> is a "multiplier" of a sorts. With this
+ parameter set to true (the default value), you will get the specified number of
+ threads <<per CPU core>>.
+
+ Also note that in this specific case <<<threadCountSuites=2>>> has the same effect
+ as <<<threadCount=2>>>, since we are using <<<parallel=suites>>>.
+
* Parallel ${project.artifactId} Execution in Multi-Module Maven Parallel Build
Maven core allows building modules of multi-module projects in parallel with
[maven-surefire] 01/08: [jenkinsci] windows-he, JDK 7,8,11
Posted by ti...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
tibordigana pushed a commit to branch release/2.22.3
in repository https://gitbox.apache.org/repos/asf/maven-surefire.git
commit aeb65d2bbba754aef28f428268dac98790f6593b
Author: Tibor Digaňa <ti...@apache.org>
AuthorDate: Sun Jan 23 07:06:27 2022 +0100
[jenkinsci] windows-he, JDK 7,8,11
---
Jenkinsfile | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/Jenkinsfile b/Jenkinsfile
index 9de3f2f..c97ac91 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -30,9 +30,9 @@ properties(
]
)
-final def oses = ['linux':'ubuntu && !H24', 'windows':'Windows']
-final def mavens = env.BRANCH_NAME == 'master' ? ['3.2.x', '3.3.x', '3.5.x'] : ['3.5.x']
-final def jdks = [7, 8, 9, 10, 11]
+final def oses = ['linux':'ubuntu', 'windows':'windows-he']
+final def mavens = env.BRANCH_NAME == 'master' ? ['3.2.x', '3.5.x'] : ['3.5.x']
+final def jdks = [7, 8, 11]
final def options = ['-e', '-V', '-B', '-nsu', '-P', 'run-its']
final def goals = ['clean', 'install', 'jacoco:report']
[maven-surefire] 03/08: enabled and fixed tests in surefire-junit-platform
Posted by ti...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
tibordigana pushed a commit to branch release/2.22.3
in repository https://gitbox.apache.org/repos/asf/maven-surefire.git
commit 4ec11cb7ab3b2b4c8e57963064c5293f37338ad5
Author: Tibor Digaňa <ti...@apache.org>
AuthorDate: Sun Jan 23 20:57:40 2022 +0100
enabled and fixed tests in surefire-junit-platform
---
surefire-providers/surefire-junit-platform/pom.xml | 4 ++
.../surefire/junitplatform/JUnit47SuiteTest.java | 44 ++++++++++++++++++++++
.../junitplatform/RunListenerAdapterTest.java | 5 ++-
.../junitplatform/TestMethodFilterTest.java | 5 ++-
4 files changed, 56 insertions(+), 2 deletions(-)
diff --git a/surefire-providers/surefire-junit-platform/pom.xml b/surefire-providers/surefire-junit-platform/pom.xml
index b50dc6d..da34605 100644
--- a/surefire-providers/surefire-junit-platform/pom.xml
+++ b/surefire-providers/surefire-junit-platform/pom.xml
@@ -138,6 +138,10 @@
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<jvm>${java.home}/bin/java</jvm>
+ <redirectTestOutputToFile>true</redirectTestOutputToFile>
+ <includes>
+ <include>**/JUnit47SuiteTest.java</include>
+ </includes>
</configuration>
</plugin>
<plugin>
diff --git a/surefire-providers/surefire-junit-platform/src/test/java/org/apache/maven/surefire/junitplatform/JUnit47SuiteTest.java b/surefire-providers/surefire-junit-platform/src/test/java/org/apache/maven/surefire/junitplatform/JUnit47SuiteTest.java
new file mode 100644
index 0000000..6e56760
--- /dev/null
+++ b/surefire-providers/surefire-junit-platform/src/test/java/org/apache/maven/surefire/junitplatform/JUnit47SuiteTest.java
@@ -0,0 +1,44 @@
+package org.apache.maven.surefire.junitplatform;
+
+/*
+ * 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 junit.framework.JUnit4TestAdapter;
+import junit.framework.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
+import org.junit.runners.Suite.SuiteClasses;
+
+/**
+ *
+ */
+@SuiteClasses( {
+ JUnitPlatformProviderTest.class,
+ RunListenerAdapterTest.class,
+ TestMethodFilterTest.class,
+ TestPlanScannerFilterTest.class
+} )
+@RunWith( Suite.class )
+public class JUnit47SuiteTest
+{
+ public static Test suite()
+ {
+ return new JUnit4TestAdapter( JUnit47SuiteTest.class );
+ }
+}
diff --git a/surefire-providers/surefire-junit-platform/src/test/java/org/apache/maven/surefire/junitplatform/RunListenerAdapterTest.java b/surefire-providers/surefire-junit-platform/src/test/java/org/apache/maven/surefire/junitplatform/RunListenerAdapterTest.java
index a6cbddd..a0ba6b7 100644
--- a/surefire-providers/surefire-junit-platform/src/test/java/org/apache/maven/surefire/junitplatform/RunListenerAdapterTest.java
+++ b/surefire-providers/surefire-junit-platform/src/test/java/org/apache/maven/surefire/junitplatform/RunListenerAdapterTest.java
@@ -46,9 +46,11 @@ import org.apache.maven.surefire.report.SimpleReportEntry;
import org.junit.Before;
import org.junit.Test;
import org.junit.jupiter.api.DisplayName;
+import org.junit.jupiter.engine.config.DefaultJupiterConfiguration;
import org.junit.jupiter.engine.config.JupiterConfiguration;
import org.junit.jupiter.engine.descriptor.ClassTestDescriptor;
import org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor;
+import org.junit.platform.engine.ConfigurationParameters;
import org.junit.platform.engine.TestDescriptor;
import org.junit.platform.engine.TestDescriptor.Type;
import org.junit.platform.engine.TestExecutionResult;
@@ -69,7 +71,8 @@ import org.mockito.InOrder;
*/
public class RunListenerAdapterTest
{
- private static final JupiterConfiguration JUPITER_CONFIGURATION = mock(JupiterConfiguration.class);
+ private static final JupiterConfiguration JUPITER_CONFIGURATION =
+ new DefaultJupiterConfiguration( mock( ConfigurationParameters.class ) );
private RunListener listener;
diff --git a/surefire-providers/surefire-junit-platform/src/test/java/org/apache/maven/surefire/junitplatform/TestMethodFilterTest.java b/surefire-providers/surefire-junit-platform/src/test/java/org/apache/maven/surefire/junitplatform/TestMethodFilterTest.java
index 3633faa..b5cb528 100644
--- a/surefire-providers/surefire-junit-platform/src/test/java/org/apache/maven/surefire/junitplatform/TestMethodFilterTest.java
+++ b/surefire-providers/surefire-junit-platform/src/test/java/org/apache/maven/surefire/junitplatform/TestMethodFilterTest.java
@@ -29,9 +29,11 @@ import java.lang.reflect.Method;
import org.apache.maven.surefire.testset.TestListResolver;
import org.junit.Test;
+import org.junit.jupiter.engine.config.DefaultJupiterConfiguration;
import org.junit.jupiter.engine.config.JupiterConfiguration;
import org.junit.jupiter.engine.descriptor.ClassTestDescriptor;
import org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor;
+import org.junit.platform.engine.ConfigurationParameters;
import org.junit.platform.engine.FilterResult;
import org.junit.platform.engine.UniqueId;
@@ -42,7 +44,8 @@ import org.junit.platform.engine.UniqueId;
*/
public class TestMethodFilterTest
{
- private static final JupiterConfiguration JUPITER_CONFIGURATION = mock(JupiterConfiguration.class);
+ private static final JupiterConfiguration JUPITER_CONFIGURATION =
+ new DefaultJupiterConfiguration( mock( ConfigurationParameters.class ) );
private final TestListResolver resolver = mock( TestListResolver.class );
[maven-surefire] 08/08: jdk1.7 build fix with m-compiler-p:3.9.0
Posted by ti...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
tibordigana pushed a commit to branch release/2.22.3
in repository https://gitbox.apache.org/repos/asf/maven-surefire.git
commit 8ef8bc088c686a366e552040895472e5fe0abf3d
Author: Tibor Digaňa <ti...@apache.org>
AuthorDate: Mon Jan 24 01:37:38 2022 +0100
jdk1.7 build fix with m-compiler-p:3.9.0
---
.../src/test/resources/surefire-855-failsafe-use-bundle/pom.xml | 5 +++++
.../src/test/resources/surefire-855-failsafe-use-jar/pom.xml | 5 +++++
.../src/test/resources/surefire-855-failsafe-use-war/pom.xml | 5 +++++
3 files changed, 15 insertions(+)
diff --git a/surefire-its/src/test/resources/surefire-855-failsafe-use-bundle/pom.xml b/surefire-its/src/test/resources/surefire-855-failsafe-use-bundle/pom.xml
index e0d4ee2..280218c 100644
--- a/surefire-its/src/test/resources/surefire-855-failsafe-use-bundle/pom.xml
+++ b/surefire-its/src/test/resources/surefire-855-failsafe-use-bundle/pom.xml
@@ -66,6 +66,11 @@
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>3.8.1</version>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>2.3</version>
<executions>
diff --git a/surefire-its/src/test/resources/surefire-855-failsafe-use-jar/pom.xml b/surefire-its/src/test/resources/surefire-855-failsafe-use-jar/pom.xml
index 01dc71e..f77705a 100644
--- a/surefire-its/src/test/resources/surefire-855-failsafe-use-jar/pom.xml
+++ b/surefire-its/src/test/resources/surefire-855-failsafe-use-jar/pom.xml
@@ -65,6 +65,11 @@
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>3.8.1</version>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>2.3</version>
<executions>
diff --git a/surefire-its/src/test/resources/surefire-855-failsafe-use-war/pom.xml b/surefire-its/src/test/resources/surefire-855-failsafe-use-war/pom.xml
index 2d2cd5d..3361e8c 100644
--- a/surefire-its/src/test/resources/surefire-855-failsafe-use-war/pom.xml
+++ b/surefire-its/src/test/resources/surefire-855-failsafe-use-war/pom.xml
@@ -66,6 +66,11 @@
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>3.8.1</version>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>2.3</version>
<executions>