Skip to content

Commit

Permalink
Move ITs to JDK 8 / JUnit 5 (apache#176)
Browse files Browse the repository at this point in the history
* Move ITs to JDK 8 / JUnit 5
* Add missing tests, move disabled test comments to the test itself
* Add unreferenced tests (Unreferenced tests are automatically added at the beginning, but it looks more coherent to add them anyway)
* Reset verifier to run fresh test in MNG-5581
* Remove useless lines
* Minimize changes in imports

Co-authored-by: Michael Osipov <michaelo@apache.org>
  • Loading branch information
gnodet and michael-o authored Sep 30, 2022
1 parent 13b14eb commit 6e8ff2d
Show file tree
Hide file tree
Showing 661 changed files with 3,102 additions and 749 deletions.
19 changes: 7 additions & 12 deletions its/core-it-suite/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -88,17 +88,10 @@ under the License.

<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<!-- NOTE: Use compile scope for transitivity. -->
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-all</artifactId>
<version>1.3</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-utils</artifactId>
Expand Down Expand Up @@ -166,9 +159,10 @@ under the License.
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<includes>
<include>**/IntegrationTestSuite.java</include>
<include>**/MavenIT*.java</include>
</includes>
<forkMode>never</forkMode>
<forkCount>0</forkCount>
<reuseForks>true</reuseForks>
<skip>true</skip>
<systemProperties>
<property>
Expand Down Expand Up @@ -318,7 +312,8 @@ under the License.
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<skip>false</skip>
<forkMode>once</forkMode>
<forkCount>1</forkCount>
<reuseForks>true</reuseForks>
<argLine>${surefireMemory}
-Dcom.sun.management.jmxremote=true</argLine>
<!-- NOTE: Maven plugins have access to the system class path
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
* under the License.
*/

import org.junit.jupiter.api.Test;
import java.io.File;
import java.io.FileInputStream;
import java.security.DigestInputStream;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@

import java.io.File;

import org.junit.jupiter.api.Test;

public class MavenIT0008SimplePluginTest
extends AbstractMavenIntegrationTestCase
{
Expand All @@ -41,6 +43,7 @@ public MavenIT0008SimplePluginTest()
*
* @throws Exception in case of failure
*/
@Test
public void testit0008()
throws Exception
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@

import java.io.File;

import org.junit.jupiter.api.Test;

public class MavenIT0009GoalConfigurationTest
extends AbstractMavenIntegrationTestCase
{
Expand All @@ -39,6 +41,7 @@ public MavenIT0009GoalConfigurationTest()
*
* @throws Exception in case of failure
*/
@Test
public void testit0009()
throws Exception
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
import java.io.File;
import java.util.List;

import org.junit.jupiter.api.Test;

public class MavenIT0010DependencyClosureResolutionTest
extends AbstractMavenIntegrationTestCase
{
Expand All @@ -40,6 +42,7 @@ public MavenIT0010DependencyClosureResolutionTest()
*
* @throws Exception in case of failure
*/
@Test
public void testit0010()
throws Exception
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
import java.io.File;
import java.util.List;

import org.junit.jupiter.api.Test;

public class MavenIT0011DefaultVersionByDependencyManagementTest
extends AbstractMavenIntegrationTestCase
{
Expand All @@ -38,6 +40,7 @@ public MavenIT0011DefaultVersionByDependencyManagementTest()
*
* @throws Exception in case of failure
*/
@Test
public void testit0011()
throws Exception
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@

import java.io.File;

import org.junit.jupiter.api.Test;

public class MavenIT0012PomInterpolationTest
extends AbstractMavenIntegrationTestCase
{
Expand All @@ -37,6 +39,7 @@ public MavenIT0012PomInterpolationTest()
*
* @throws Exception in case of failure
*/
@Test
public void testit0012()
throws Exception
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@

import java.io.File;

import org.junit.jupiter.api.Test;

public class MavenIT0018DependencyManagementTest
extends AbstractMavenIntegrationTestCase
{
Expand All @@ -39,6 +41,7 @@ public MavenIT0018DependencyManagementTest()
*
* @throws Exception in case of failure
*/
@Test
public void testit0018()
throws Exception
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@

import java.io.File;

import org.junit.jupiter.api.Test;

public class MavenIT0019PluginVersionMgmtBySuperPomTest
extends AbstractMavenIntegrationTestCase
{
Expand All @@ -37,6 +39,7 @@ public MavenIT0019PluginVersionMgmtBySuperPomTest()
*
* @throws Exception in case of failure
*/
@Test
public void testit0019()
throws Exception
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@

import java.io.File;

import org.junit.jupiter.api.Test;

public class MavenIT0021PomProfileTest
extends AbstractMavenIntegrationTestCase
{
Expand All @@ -38,6 +40,7 @@ public MavenIT0021PomProfileTest()
*
* @throws Exception in case of failure
*/
@Test
public void testit0021()
throws Exception
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@

import java.io.File;

import org.junit.jupiter.api.Test;

public class MavenIT0023SettingsProfileTest
extends AbstractMavenIntegrationTestCase
{
Expand All @@ -38,6 +40,7 @@ public MavenIT0023SettingsProfileTest()
*
* @throws Exception in case of failure
*/
@Test
public void testit0023()
throws Exception
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@

import java.io.File;

import org.junit.jupiter.api.Test;

/**
* This is a test set for <a href="https://issues.apache.org/jira/browse/MNG-172">MNG-172</a>.
*
Expand All @@ -44,6 +46,7 @@ public MavenIT0024MultipleGoalExecutionsTest()
*
* @throws Exception in case of failure
*/
@Test
public void testit0024()
throws Exception
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@

import java.io.File;

import org.junit.jupiter.api.Test;

/**
* This is a test set for <a href="https://issues.apache.org/jira/browse/MNG-172">MNG-172</a>.
*
Expand All @@ -43,6 +45,7 @@ public MavenIT0025MultipleExecutionLevelConfigsTest()
*
* @throws Exception in case of failure
*/
@Test
public void testit0025()
throws Exception
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@

import java.io.File;

import org.junit.jupiter.api.Test;

public class MavenIT0030DepPomDepMgmtInheritanceTest
extends AbstractMavenIntegrationTestCase
{
Expand All @@ -38,6 +40,7 @@ public MavenIT0030DepPomDepMgmtInheritanceTest()
*
* @throws Exception in case of failure
*/
@Test
public void testit0030()
throws Exception
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@

import java.io.File;

import org.junit.jupiter.api.Test;

public class MavenIT0032MavenPrerequisiteTest
extends AbstractMavenIntegrationTestCase
{
Expand All @@ -37,6 +39,7 @@ public MavenIT0032MavenPrerequisiteTest()
*
* @throws Exception in case of failure
*/
@Test
public void testit0032()
throws Exception
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@

import java.io.File;

import org.junit.jupiter.api.Test;

/**
* This is a test set for <a href="https://issues.apache.org/jira/browse/MNG-607">MNG-607</a>.
*
Expand All @@ -43,6 +45,7 @@ public MavenIT0037AlternatePomFileSameDirTest()
*
* @throws Exception in case of failure
*/
@Test
public void testit0037()
throws Exception
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@

import java.io.File;

import org.junit.jupiter.api.Test;

/**
* This is a test set for <a href="https://issues.apache.org/jira/browse/MNG-607">MNG-607</a>.
*
Expand All @@ -43,6 +45,7 @@ public MavenIT0038AlternatePomFileDifferentDirTest()
*
* @throws Exception in case of failure
*/
@Test
public void testit0038()
throws Exception
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@

import java.io.File;

import org.junit.jupiter.api.Test;

/**
* This is a test set for <a href="https://issues.apache.org/jira/browse/MNG-598">MNG-598</a>.
*
Expand All @@ -44,6 +46,7 @@ public MavenIT0040PackagingFromPluginExtensionTest()
*
* @throws Exception in case of failure
*/
@Test
public void testit0040()
throws Exception
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@

import java.io.File;

import org.junit.jupiter.api.Test;

/**
* This is a test set for <a href="https://issues.apache.org/jira/browse/MNG-598">MNG-598</a>.
*
Expand All @@ -43,6 +45,7 @@ public MavenIT0041ArtifactTypeFromPluginExtensionTest()
*
* @throws Exception in case of failure
*/
@Test
public void testit0041()
throws Exception
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@

import java.io.File;

import org.junit.jupiter.api.Test;

public class MavenIT0051ReleaseProfileTest
extends AbstractMavenIntegrationTestCase
{
Expand All @@ -38,6 +40,7 @@ public MavenIT0051ReleaseProfileTest()
*
* @throws Exception in case of failure
*/
@Test
public void testit0051()
throws Exception
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@

import java.io.File;

import org.junit.jupiter.api.Test;

public class MavenIT0052ReleaseProfileTest
extends AbstractMavenIntegrationTestCase
{
Expand All @@ -38,6 +40,7 @@ public MavenIT0052ReleaseProfileTest()
*
* @throws Exception in case of failure
*/
@Test
public void testit0052()
throws Exception
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@

import java.io.File;

import org.junit.jupiter.api.Test;

public class MavenIT0056MultipleGoalExecutionsTest
extends AbstractMavenIntegrationTestCase
{
Expand All @@ -38,6 +40,7 @@ public MavenIT0056MultipleGoalExecutionsTest()
*
* @throws Exception in case of failure
*/
@Test
public void testit0056()
throws Exception
{
Expand Down
Loading

0 comments on commit 6e8ff2d

Please sign in to comment.