This is an automated email from the ASF dual-hosted git repository.
tibordigana pushed a commit to branch 1564
in repository https://gitbox.apache.org/repos/asf/maven-surefire.git
The following commit(s) were added to refs/heads/1564 by this push:
new 5279eb4 fixed classpath order, ITs and unit tests
5279eb4 is described below
commit 5279eb4f4f8f76b324a8e8a7e827fef34413493c
Author: Tibor17 <[email protected]>
AuthorDate: Fri Sep 28 07:32:30 2018 +0200
fixed classpath order, ITs and unit tests
---
.../main/java/org/apache/maven/plugin/surefire/TestClassPath.java | 2 +-
.../apache/maven/plugin/surefire/AbstractSurefireMojoTest.java | 8 ++++----
surefire-its/pom.xml | 3 +--
3 files changed, 6 insertions(+), 7 deletions(-)
diff --git
a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/TestClassPath.java
b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/TestClassPath.java
index d1b57d1..bad0b31 100644
---
a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/TestClassPath.java
+++
b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/TestClassPath.java
@@ -82,8 +82,8 @@ final class TestClassPath
Classpath toClasspath()
{
List<String> classpath = new ArrayList<String>();
- classpath.add( classesDirectory.getAbsolutePath() );
classpath.add( testClassesDirectory.getAbsolutePath() );
+ classpath.add( classesDirectory.getAbsolutePath() );
for ( Artifact artifact : artifacts )
{
if ( artifact.getArtifactHandler().isAddedToClasspath() )
diff --git
a/maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/AbstractSurefireMojoTest.java
b/maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/AbstractSurefireMojoTest.java
index 417d632..04528ab 100644
---
a/maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/AbstractSurefireMojoTest.java
+++
b/maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/AbstractSurefireMojoTest.java
@@ -141,8 +141,8 @@ public class AbstractSurefireMojoTest
verify( mojo, times( 1 ) ).getAdditionalClasspathElements();
assertThat( cp.toClasspath().getClassPath() ).hasSize( 3 );
- assertThat( cp.toClasspath().getClassPath().get( 0 ) ).endsWith(
"classes" );
- assertThat( cp.toClasspath().getClassPath().get( 1 ) ).endsWith(
"test-classes" );
+ assertThat( cp.toClasspath().getClassPath().get( 0 ) ).endsWith(
"test-classes" );
+ assertThat( cp.toClasspath().getClassPath().get( 1 ) ).endsWith(
"classes" );
assertThat( cp.toClasspath().getClassPath().get( 2 ) ).endsWith(
"a2-2.jar" );
}
@@ -211,9 +211,9 @@ public class AbstractSurefireMojoTest
ArgumentCaptor<String> argument = ArgumentCaptor.forClass(
String.class );
verify( logger, times( 4 ) ).debug( argument.capture() );
assertThat( argument.getAllValues() )
- .containsExactly( "test classpath: classes test-classes
junit.jar hamcrest.jar",
+ .containsExactly( "test classpath: test-classes classes
junit.jar hamcrest.jar",
"provider classpath: surefire-provider.jar",
- "test(compact) classpath: classes test-classes
junit.jar hamcrest.jar",
+ "test(compact) classpath: test-classes classes
junit.jar hamcrest.jar",
"provider(compact) classpath: surefire-provider.jar"
);
diff --git a/surefire-its/pom.xml b/surefire-its/pom.xml
index 892bccd..5ee30c9 100644
--- a/surefire-its/pom.xml
+++ b/surefire-its/pom.xml
@@ -97,7 +97,6 @@
<artifactId>maven-failsafe-plugin</artifactId>
<version>2.12.4</version> <!-- ${shadedVersion}, but resolved due to
https://issues.apache.org/jira/browse/MRELEASE-799 -->
<configuration>
- <skipTests>false</skipTests>
<jvm>${jdk.home}/bin/java</jvm>
<runOrder>alphabetical</runOrder>
<threadCount>1</threadCount>
@@ -105,7 +104,7 @@
<forkMode>once</forkMode>
<argLine>-server -Xmx64m -XX:+UseG1GC -XX:+TieredCompilation
-XX:TieredStopAtLevel=1 -Djava.awt.headless=true</argLine>
<includes>
- <include>org/apache/**/JUnitPlatformIT.java</include>
+ <include>org/apache/**/*IT*.java</include>
</includes>
<!-- Pass current surefire version to the main suite so that it -->
<!-- can forward to all integration test projects. SUREFIRE-513 -->