Updated Branches: refs/heads/master 3a0dbc30a -> d254b80d2
Removed some unsued code Project: http://git-wip-us.apache.org/repos/asf/maven-surefire/repo Commit: http://git-wip-us.apache.org/repos/asf/maven-surefire/commit/d254b80d Tree: http://git-wip-us.apache.org/repos/asf/maven-surefire/tree/d254b80d Diff: http://git-wip-us.apache.org/repos/asf/maven-surefire/diff/d254b80d Branch: refs/heads/master Commit: d254b80d2d6d4e1a986b57420c815722fe0e71b3 Parents: 3a0dbc3 Author: Kristian Rosenvold <[email protected]> Authored: Fri Mar 22 15:58:11 2013 +0100 Committer: Kristian Rosenvold <[email protected]> Committed: Fri Mar 22 15:58:11 2013 +0100 ---------------------------------------------------------------------- .../org/apache/maven/surefire/its/ForkModeIT.java | 10 +++--- .../maven/surefire/its/ForkModeMultiModuleIT.java | 2 +- .../maven/surefire/its/fixture/MavenLauncher.java | 13 +------- .../surefire/its/fixture/OutputValidator.java | 25 --------------- .../surefire/its/fixture/SurefireLauncher.java | 2 +- ...Surefire946KillMainProcessInReusableForkIT.java | 2 +- .../its/jiras/Surefire975DefaultVMEncodingIT.java | 1 - 7 files changed, 9 insertions(+), 46 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/d254b80d/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/ForkModeIT.java ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/ForkModeIT.java b/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/ForkModeIT.java index e3f3c05..233a993 100644 --- a/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/ForkModeIT.java +++ b/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/ForkModeIT.java @@ -42,7 +42,7 @@ public class ForkModeIT @Test public void testForkModeAlways() { - String[] pids = doTest( unpack( getProject() ).setForkJvm( true ).forkAlways() ); + String[] pids = doTest( unpack( getProject() ).setForkJvm().forkAlways() ); assertDifferentPids( pids ); assertEndWith( pids, "_1_1", 3); assertFalse( "pid 1 is not the same as the main process' pid", pids[0].equals( getMyPID() ) ); @@ -51,7 +51,7 @@ public class ForkModeIT @Test public void testForkModePerTest() { - String[] pids = doTest( unpack( getProject() ).setForkJvm( true ).forkPerTest() ); + String[] pids = doTest( unpack( getProject() ).setForkJvm().forkPerTest() ); assertDifferentPids( pids ); assertEndWith( pids, "_1_1", 3); assertFalse( "pid 1 is not the same as the main process' pid", pids[0].equals( getMyPID() ) ); @@ -78,7 +78,7 @@ public class ForkModeIT @Test public void testForkModeOncePerThreadSingleThread() { - String[] pids = doTest( unpack( getProject() ).setForkJvm( true ).forkOncePerThread().threadCount( 1 ) ); + String[] pids = doTest( unpack( getProject() ).setForkJvm().forkOncePerThread().threadCount( 1 ) ); assertSamePids( pids ); assertEndWith( pids, "_1_1", 3); assertFalse( "pid 1 is not the same as the main process' pid", pids[0].equals( getMyPID() ) ); @@ -104,7 +104,7 @@ public class ForkModeIT @Test public void testForkCountOneNoReuse() { - String[] pids = doTest( unpack( getProject() ).setForkJvm( true ).forkCount( 1 ).reuseForks( false ) ); + String[] pids = doTest( unpack( getProject() ).setForkJvm().forkCount( 1 ).reuseForks( false ) ); assertDifferentPids( pids ); assertEndWith( pids, "_1_1", 3); assertFalse( "pid 1 is not the same as the main process' pid", pids[0].equals( getMyPID() ) ); @@ -113,7 +113,7 @@ public class ForkModeIT @Test public void testForkCountOneReuse() { - String[] pids = doTest( unpack( getProject() ).setForkJvm( true ).forkCount( 1 ).reuseForks( true ) ); + String[] pids = doTest( unpack( getProject() ).setForkJvm().forkCount( 1 ).reuseForks( true ) ); assertSamePids( pids ); assertEndWith( pids, "_1_1", 3); assertFalse( "pid 1 is not the same as the main process' pid", pids[0].equals( getMyPID() ) ); http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/d254b80d/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/ForkModeMultiModuleIT.java ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/ForkModeMultiModuleIT.java b/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/ForkModeMultiModuleIT.java index b00430e..f4c5dd5 100644 --- a/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/ForkModeMultiModuleIT.java +++ b/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/ForkModeMultiModuleIT.java @@ -132,7 +132,7 @@ public class ForkModeMultiModuleIT { forkMode.addGoal( "-T 2" ); forkMode.sysProp( "testProperty", "testValue_${surefire.threadNumber}_${surefire.forkNumber}" ); - final OutputValidator outputValidator = forkMode.setForkJvm( true ).executeTest(); + final OutputValidator outputValidator = forkMode.setForkJvm().executeTest(); List<String> pids = new ArrayList<String>( 6 ); pids.addAll( validateModule( outputValidator, "module-a" ) ); pids.addAll( validateModule( outputValidator, "module-b" ) ); http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/d254b80d/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/fixture/MavenLauncher.java ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/fixture/MavenLauncher.java b/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/fixture/MavenLauncher.java index cc745de..4acc8fc 100755 --- a/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/fixture/MavenLauncher.java +++ b/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/fixture/MavenLauncher.java @@ -86,6 +86,7 @@ public class MavenLauncher throws IOException { FileUtils.deleteDirectory( dest ); + //noinspection ResultOfMethodCallIgnored getUnpackedAt().renameTo( dest ); unpackedAt = dest; } @@ -213,12 +214,6 @@ public class MavenLauncher return conditionalExec( "test" ); } - public OutputValidator executeInstall() - throws VerificationException - { - return conditionalExec( "install" ); - } - private OutputValidator conditionalExec(String goal) { OutputValidator verify; @@ -251,12 +246,6 @@ public class MavenLauncher return this; } - public MavenLauncher addCleanGoal() - { - addGoal( "clean" ); - return this; - } - public OutputValidator execute( String goal ) { http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/d254b80d/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/fixture/OutputValidator.java ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/fixture/OutputValidator.java b/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/fixture/OutputValidator.java index f5beb9c..2671879 100644 --- a/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/fixture/OutputValidator.java +++ b/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/fixture/OutputValidator.java @@ -87,20 +87,6 @@ public class OutputValidator } } - public OutputValidator verifyErrorFreeIntegrationTests( int total ) - { - try - { - verifier.verifyErrorFreeLog(); - this.assertIntegrationTestSuiteResults( total, 0, 0, 0 ); - return this; - } - catch ( VerificationException e ) - { - throw new SurefireVerifierException( e ); - } - } - public List<String> loadFile( File file, Charset charset ) { //noinspection unchecked @@ -133,12 +119,6 @@ public class OutputValidator } - public String getArtifactPath( String org, String name, String version, String ext ) - { - return verifier.getArtifactPath( org, name, version, ext ); - } - - public OutputValidator assertTestSuiteResults( int total, int errors, int failures, int skipped ) { HelperAssertions.assertTestSuiteResults( total, errors, failures, skipped, baseDir ); @@ -212,9 +192,4 @@ public class OutputValidator } return false; } - - Verifier getVerifier() - { - return verifier; - } } http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/d254b80d/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/fixture/SurefireLauncher.java ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/fixture/SurefireLauncher.java b/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/fixture/SurefireLauncher.java index 5b0ecdd..fffde85 100755 --- a/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/fixture/SurefireLauncher.java +++ b/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/fixture/SurefireLauncher.java @@ -391,7 +391,7 @@ public class SurefireLauncher return this; } - public SurefireLauncher setForkJvm( boolean forkJvm ) + public SurefireLauncher setForkJvm() { mavenLauncher.setForkJvm( true ); return this; http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/d254b80d/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/jiras/Surefire946KillMainProcessInReusableForkIT.java ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/jiras/Surefire946KillMainProcessInReusableForkIT.java b/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/jiras/Surefire946KillMainProcessInReusableForkIT.java index 60bcfb7..bef2378 100644 --- a/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/jiras/Surefire946KillMainProcessInReusableForkIT.java +++ b/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/jiras/Surefire946KillMainProcessInReusableForkIT.java @@ -65,7 +65,7 @@ public class Surefire946KillMainProcessInReusableForkIT .sysProp( "selfdestruct.method", method ) .sysProp( "testSleepTime", String.valueOf( TEST_SLEEP_TIME ) ) .addGoal( "org.apache.maven.plugins.surefire:maven-selfdestruct-plugin:selfdestruct" ) - .setForkJvm( true ) + .setForkJvm() .forkOncePerThread().threadCount( 1 ).maven().withFailure().executeTest(); } } http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/d254b80d/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/jiras/Surefire975DefaultVMEncodingIT.java ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/jiras/Surefire975DefaultVMEncodingIT.java b/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/jiras/Surefire975DefaultVMEncodingIT.java index 1fce01d..0f30dbc 100644 --- a/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/jiras/Surefire975DefaultVMEncodingIT.java +++ b/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/jiras/Surefire975DefaultVMEncodingIT.java @@ -21,7 +21,6 @@ package org.apache.maven.surefire.its.jiras; import org.apache.maven.surefire.its.fixture.OutputValidator; import org.apache.maven.surefire.its.fixture.SurefireJUnit4IntegrationTestCase; -import org.junit.BeforeClass; import org.junit.Test; public class Surefire975DefaultVMEncodingIT
