http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/jiras/Surefire1364SystemPropertiesIT.java ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/jiras/Surefire1364SystemPropertiesIT.java b/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/jiras/Surefire1364SystemPropertiesIT.java deleted file mode 100644 index d13b0f2..0000000 --- a/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/jiras/Surefire1364SystemPropertiesIT.java +++ /dev/null @@ -1,203 +0,0 @@ -package org.apache.maven.surefire.its.jiras; - -/* - * 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.surefire.its.fixture.OutputValidator; -import org.apache.maven.surefire.its.fixture.SurefireJUnit4IntegrationTestCase; -import org.apache.maven.surefire.its.fixture.SurefireLauncher; -import org.junit.Test; - -/** - * Report XML should contain system properties of forked JVM. - * - * @author <a href="mailto:tibordig...@apache.org">Tibor Digana (tibor17)</a> - * @since 2.20.1 - */ -public class Surefire1364SystemPropertiesIT - extends SurefireJUnit4IntegrationTestCase -{ - @Test - public void junit3Forked() - { - SurefireLauncher launcher = unpack( "surefire-1364" ); - OutputValidator validator = launcher.setForkJvm() - .activateProfile( "junit3" ) - .forkMode( "once" ) - .executeTest() - .verifyErrorFree( 2 ); - - validator.getSurefireReportsXmlFile( "TEST-FirstTest.xml" ) - .assertContainsText( "<property name=\"forkedProp\" value=\"forkedValue1\"/>" ); - - validator.getSurefireReportsXmlFile( "TEST-SecondTest.xml" ) - .assertContainsText( "<property name=\"forkedProp\" value=\"forkedValue1\"/>" ); - } - - @Test - public void junit3InProcess() - { - SurefireLauncher launcher = unpack( "surefire-1364" ); - OutputValidator validator = launcher.setForkJvm() - .activateProfile( "junit3" ) - .forkMode( "never" ) - .executeTest() - .verifyErrorFree( 2 ); - - validator.getSurefireReportsXmlFile( "TEST-FirstTest.xml" ) - .assertContainsText( "<property name=\"forkedProp\" value=\"forkedValue1\"/>" ); - - validator.getSurefireReportsXmlFile( "TEST-SecondTest.xml" ) - .assertContainsText( "<property name=\"forkedProp\" value=\"forkedValue1\"/>" ); - } - - @Test - public void junit4Forked() - { - SurefireLauncher launcher = unpack( "surefire-1364" ); - OutputValidator validator = launcher.setForkJvm() - .forkMode( "once" ) - .executeTest() - .verifyErrorFree( 2 ); - - validator.getSurefireReportsXmlFile( "TEST-FirstTest.xml" ) - .assertContainsText( "<property name=\"forkedProp\" value=\"forkedValue1\"/>" ); - - validator.getSurefireReportsXmlFile( "TEST-SecondTest.xml" ) - .assertContainsText( "<property name=\"forkedProp\" value=\"forkedValue1\"/>" ); - } - - @Test - public void junit4InProcess() - { - SurefireLauncher launcher = unpack( "surefire-1364" ); - OutputValidator validator = launcher.setForkJvm() - .forkMode( "never" ) - .executeTest() - .verifyErrorFree( 2 ); - - validator.getSurefireReportsXmlFile( "TEST-FirstTest.xml" ) - .assertContainsText( "<property name=\"forkedProp\" value=\"forkedValue1\"/>" ); - - validator.getSurefireReportsXmlFile( "TEST-SecondTest.xml" ) - .assertContainsText( "<property name=\"forkedProp\" value=\"forkedValue1\"/>" ); - } - - @Test - public void junit47Forked() - { - SurefireLauncher launcher = unpack( "surefire-1364" ); - OutputValidator validator = launcher.setForkJvm() - .activateProfile( "junit47" ) - .forkMode( "once" ) - .executeTest() - .verifyErrorFree( 2 ); - - validator.getSurefireReportsXmlFile( "TEST-FirstTest.xml" ) - .assertContainsText( "<property name=\"forkedProp\" value=\"forkedValue1\"/>" ); - - validator.getSurefireReportsXmlFile( "TEST-SecondTest.xml" ) - .assertContainsText( "<property name=\"forkedProp\" value=\"forkedValue1\"/>" ); - } - - @Test - public void junit47InProcess() - { - SurefireLauncher launcher = unpack( "surefire-1364" ); - OutputValidator validator = launcher.setForkJvm() - .activateProfile( "junit47" ) - .forkMode( "never" ) - .executeTest() - .verifyErrorFree( 2 ); - - validator.getSurefireReportsXmlFile( "TEST-FirstTest.xml" ) - .assertContainsText( "<property name=\"forkedProp\" value=\"forkedValue1\"/>" ); - - validator.getSurefireReportsXmlFile( "TEST-SecondTest.xml" ) - .assertContainsText( "<property name=\"forkedProp\" value=\"forkedValue1\"/>" ); - } - - @Test - public void junit47ForkedParallel() - { - SurefireLauncher launcher = unpack( "surefire-1364" ); - OutputValidator validator = launcher.setForkJvm() - .activateProfile( "junit47" ) - .forkMode( "once" ) - .parallelClasses() - .threadCount( 2 ) - .disablePerCoreThreadCount() - .executeTest() - .verifyErrorFree( 2 ); - - validator.getSurefireReportsXmlFile( "TEST-FirstTest.xml" ) - .assertContainsText( "<property name=\"forkedProp\" value=\"forkedValue1\"/>" ); - - validator.getSurefireReportsXmlFile( "TEST-SecondTest.xml" ) - .assertContainsText( "<property name=\"forkedProp\" value=\"forkedValue1\"/>" ); - } - - @Test - public void junit47InProcessParallel() - { - SurefireLauncher launcher = unpack( "surefire-1364" ); - OutputValidator validator = launcher.setForkJvm() - .activateProfile( "junit47" ) - .forkMode( "never" ) - .parallelClasses() - .threadCount( 2 ) - .disablePerCoreThreadCount() - .executeTest() - .verifyErrorFree( 2 ); - - validator.getSurefireReportsXmlFile( "TEST-FirstTest.xml" ) - .assertContainsText( "<property name=\"forkedProp\" value=\"forkedValue1\"/>" ); - - validator.getSurefireReportsXmlFile( "TEST-SecondTest.xml" ) - .assertContainsText( "<property name=\"forkedProp\" value=\"forkedValue1\"/>" ); - } - - @Test - public void testNg() - { - SurefireLauncher launcher = unpack( "surefire-1364" ); - OutputValidator validator = launcher.setForkJvm() - .activateProfile( "testng" ) - .forkMode( "once" ) - .executeTest() - .verifyErrorFree( 3 ); - - validator.getSurefireReportsXmlFile( "TEST-TestSuite.xml" ) - .assertContainsText( "<property name=\"forkedProp\" value=\"forkedValue1\"/>" ); - } - - @Test - public void testNgInProcess() - { - SurefireLauncher launcher = unpack( "surefire-1364" ); - OutputValidator validator = launcher.setForkJvm() - .activateProfile( "testng" ) - .forkMode( "never" ) - .executeTest() - .verifyErrorFree( 3 ); - - validator.getSurefireReportsXmlFile( "TEST-TestSuite.xml" ) - .assertContainsText( "<property name=\"forkedProp\" value=\"forkedValue1\"/>" ); - } -}
http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/jiras/Surefire1367AssumptionLogsIT.java ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/jiras/Surefire1367AssumptionLogsIT.java b/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/jiras/Surefire1367AssumptionLogsIT.java deleted file mode 100644 index 48564fb..0000000 --- a/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/jiras/Surefire1367AssumptionLogsIT.java +++ /dev/null @@ -1,157 +0,0 @@ -package org.apache.maven.surefire.its.jiras; - -/* - * 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.surefire.its.fixture.OutputValidator; -import org.apache.maven.surefire.its.fixture.SurefireJUnit4IntegrationTestCase; -import org.apache.maven.surefire.its.fixture.SurefireLauncher; -import org.junit.Test; - -import static org.fest.assertions.Assertions.assertThat; - -/** - * @author <a href="mailto:tibordig...@apache.org">Tibor Digana (tibor17)</a> - * @see <a href="https://issues.apache.org/jira/browse/SUREFIRE-1367">SUREFIRE-1367</a> - * @since 2.20.1 - */ -public class Surefire1367AssumptionLogsIT - extends SurefireJUnit4IntegrationTestCase -{ - private static final String NL = System.getProperty( "line.separator" ); - - @Test - public void shouldSeeLogsParallelForked() - { - OutputValidator outputValidator = unpack().setForkJvm() - .forkMode( "once" ) - .parallelClassesAndMethods() - .disablePerCoreThreadCount() - .threadCountClasses( 2 ) - .threadCountMethods( 2 ) - .executeTest() - .assertTestSuiteResults( 2, 0, 0, 2 ); - - verifyReportA( outputValidator ); - verifyReportB( outputValidator ); - } - - @Test - public void shouldSeeLogsParallelInPlugin() - { - OutputValidator outputValidator = unpack().setForkJvm() - .forkMode( "never" ) - .parallelClassesAndMethods() - .disablePerCoreThreadCount() - .threadCountClasses( 2 ) - .threadCountMethods( 2 ) - .executeTest() - .assertTestSuiteResults( 2, 0, 0, 2 ); - - verifyReportA( outputValidator ); - verifyReportB( outputValidator ); - } - - @Test - public void shouldSeeLogsForked() - { - OutputValidator outputValidator = unpack().setForkJvm() - .forkMode( "once" ) - .executeTest() - .assertTestSuiteResults( 2, 0, 0, 2 ); - - verifyReportA( outputValidator ); - verifyReportB( outputValidator ); - } - - @Test - public void shouldSeeLogsInPlugin() - { - OutputValidator outputValidator = unpack().setForkJvm() - .forkMode( "never" ) - .executeTest() - .assertTestSuiteResults( 2, 0, 0, 2 ); - - verifyReportA( outputValidator ); - verifyReportB( outputValidator ); - } - - - private SurefireLauncher unpack() - { - return unpack( "/surefire-1367" ); - } - - private void verifyReportA( OutputValidator outputValidator ) - { - String xmlReport = outputValidator.getSurefireReportsXmlFile( "TEST-ATest.xml" ) - .readFileToString(); - - String outputCData = "<system-out><![CDATA[Hi" + NL + - NL + - "There!" + NL + - "]]></system-out>" + NL + - " <system-err><![CDATA[Hello" + NL + - NL + - "What's up!" + NL + - "]]></system-err>"; - - assertThat( xmlReport ) - .contains( outputCData ); - - - String output = outputValidator.getSurefireReportsFile( "ATest-output.txt" ) - .readFileToString(); - - String outputExpected = "Hi" + NL + - NL + - "There!" + NL + - "Hello" + NL + - NL + - "What's up!" + NL; - - assertThat( output ) - .isEqualTo( outputExpected ); - } - - private void verifyReportB( OutputValidator outputValidator ) - { - String xmlReport = outputValidator.getSurefireReportsXmlFile( "TEST-BTest.xml" ) - .readFileToString(); - - String outputCData = "<system-out><![CDATA[Hey" + NL + - NL + - "you!" + NL + - "]]></system-out>"; - - assertThat( xmlReport ) - .contains( outputCData ); - - - String output = outputValidator.getSurefireReportsFile( "BTest-output.txt" ) - .readFileToString(); - - String outputExpected = "Hey" + NL + - NL + - "you!" + NL; - - assertThat( output ) - .isEqualTo( outputExpected ); - } -} http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/jiras/Surefire1396CustomProviderClassPathIT.java ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/jiras/Surefire1396CustomProviderClassPathIT.java b/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/jiras/Surefire1396CustomProviderClassPathIT.java deleted file mode 100644 index 4a27688..0000000 --- a/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/jiras/Surefire1396CustomProviderClassPathIT.java +++ /dev/null @@ -1,52 +0,0 @@ -package org.apache.maven.surefire.its.jiras; - -/* - * 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.SurefireJUnit4IntegrationTestCase; -import org.junit.BeforeClass; -import org.junit.Test; - -/** - * @author Jonathan Bell - */ -public class Surefire1396CustomProviderClassPathIT - extends SurefireJUnit4IntegrationTestCase -{ - @BeforeClass - public static void installProvider() - throws VerificationException - { - unpack( Surefire1396CustomProviderClassPathIT.class, "surefire-1396-pluggableproviders-classpath-provider", "prov" ).executeInstall(); - } - - @Test - public void pluggableProviderClasspathCorrect() - throws Exception - { - unpack( "surefire-1396-pluggableproviders-classpath" ) - .setForkJvm() - .maven() - .showExceptionMessages() - .debugLogging() - .executeVerify() - .verifyErrorFreeLog(); - } -} http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/jiras/Surefire141PluggableProvidersIT.java ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/jiras/Surefire141PluggableProvidersIT.java b/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/jiras/Surefire141PluggableProvidersIT.java deleted file mode 100644 index b185217..0000000 --- a/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/jiras/Surefire141PluggableProvidersIT.java +++ /dev/null @@ -1,179 +0,0 @@ -package org.apache.maven.surefire.its.jiras; - -/* - * 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.apache.maven.surefire.its.fixture.SurefireVerifierException; -import org.junit.BeforeClass; -import org.junit.Test; - -import java.io.File; -import java.io.FilenameFilter; - -import static org.fest.assertions.Assertions.assertThat; - -/** - * SUREFIRE-613 Asserts proper test counts when running in parallel - * - * @author Kristian Rosenvold - */ -public class Surefire141PluggableProvidersIT - extends SurefireJUnit4IntegrationTestCase -{ - @BeforeClass - public static void installProvider() - throws VerificationException - { - unpack( Surefire141PluggableProvidersIT.class, "surefire-141-pluggableproviders-provider", "prov" ) - .executeInstall(); - } - - @Test - public void pluggableProviderPresent() - throws Exception - { - unpack( "surefire-141-pluggableproviders" ) - .setForkJvm() - .maven() - .showExceptionMessages() - .debugLogging() - .executeTest() - .verifyTextInLog( "Using configured provider org.apache.maven.surefire.testprovider.TestProvider" ) - .verifyTextInLog( "Using configured provider org.apache.maven.surefire.junit.JUnit3Provider" ) - .verifyErrorFreeLog(); - } - - @Test - public void invokeRuntimeException() - throws Exception - { - final String errorText = "Let's fail with a runtimeException"; - - OutputValidator validator = unpack( "surefire-141-pluggableproviders" ) - .setForkJvm() - .sysProp( "invokeCrash", "runtimeException" ) - .maven() - .withFailure() - .executeTest(); - - assertErrorMessage( validator, errorText ); - - boolean hasErrorInLog = verifiedErrorInLog( validator, "There was an error in the forked process" ); - boolean verifiedInLog = verifiedErrorInLog( validator, errorText ); - assertThat( hasErrorInLog && verifiedInLog ) - .describedAs( "'" + errorText + "' could not be verified in log.txt nor *.dump file. (" - + hasErrorInLog + ", " + verifiedInLog + ")" ) - .isTrue(); - } - - @Test - public void invokeReporterException() - throws Exception - { - final String errorText = "Let's fail with a reporterexception"; - - OutputValidator validator = unpack( "surefire-141-pluggableproviders" ) - .setForkJvm() - .sysProp( "invokeCrash", "reporterException" ) - .maven() - .withFailure() - .executeTest(); - - assertErrorMessage( validator, errorText ); - - boolean hasErrorInLog = verifiedErrorInLog( validator, "There was an error in the forked process" ); - boolean verifiedInLog = verifiedErrorInLog( validator, errorText ); - assertThat( hasErrorInLog && verifiedInLog ) - .describedAs( "'" + errorText + "' could not be verified in log.txt nor *.dump file. (" - + hasErrorInLog + ", " + verifiedInLog + ")" ) - .isTrue(); - } - - @Test - public void constructorRuntimeException() - throws Exception - { - final String errorText = "Let's fail with a runtimeException"; - - OutputValidator validator = unpack( "surefire-141-pluggableproviders" ) - .setForkJvm() - .sysProp( "constructorCrash", "runtimeException" ) - .maven() - .withFailure() - .executeTest(); - - assertErrorMessage( validator, errorText ); - - boolean hasErrorInLog = verifiedErrorInLog( validator, "There was an error in the forked process" ); - boolean verifiedInLog = verifiedErrorInLog( validator, errorText ); - assertThat( hasErrorInLog && verifiedInLog ) - .describedAs( "'" + errorText + "' could not be verified in log.txt nor *.dump file. (" - + hasErrorInLog + ", " + verifiedInLog + ")" ) - .isTrue(); - } - - private static void assertErrorMessage( OutputValidator validator, String message ) - { - File reportDir = validator.getSurefireReportsDirectory(); - String[] dumpFiles = reportDir.list( new FilenameFilter() - { - @Override - public boolean accept( File dir, String name ) - { - return name.endsWith( ".dump" ); - } - }); - assertThat( dumpFiles ).isNotEmpty(); - for ( String dump : dumpFiles ) - { - validator.getSurefireReportsFile( dump ) - .assertContainsText( message ); - } - } - - private static boolean verifiedErrorInLog( OutputValidator validator, String errorText ) - { - try - { - validator.verifyTextInLog( errorText ); - return true; - } - catch ( SurefireVerifierException e ) - { - return false; - } - } - - private static boolean verifiedErrorInDump( OutputValidator validator, String errorText ) - { - try - { - assertErrorMessage( validator, errorText ); - return true; - } - catch ( AssertionError e ) - { - return false; - } - } - -} http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/jiras/Surefire146ForkPerTestNoSetupIT.java ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/jiras/Surefire146ForkPerTestNoSetupIT.java b/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/jiras/Surefire146ForkPerTestNoSetupIT.java deleted file mode 100644 index 7e50f25..0000000 --- a/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/jiras/Surefire146ForkPerTestNoSetupIT.java +++ /dev/null @@ -1,38 +0,0 @@ -package org.apache.maven.surefire.its.jiras; - -/* - * 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.surefire.its.fixture.SurefireJUnit4IntegrationTestCase; -import org.junit.Test; - -/** - * Test Surefire-146 (forkMode=pertest fails to call setUp) - * - * @author <a href="mailto:dfabul...@apache.org">Dan Fabulich</a> - */ -public class Surefire146ForkPerTestNoSetupIT - extends SurefireJUnit4IntegrationTestCase -{ - @Test - public void testForkPerTestNoSetup() - { - executeErrorFreeTest( "surefire-146-forkPerTestNoSetup", 1 ); - } -} http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/jiras/Surefire162CharsetProviderIT.java ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/jiras/Surefire162CharsetProviderIT.java b/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/jiras/Surefire162CharsetProviderIT.java deleted file mode 100644 index e13483a..0000000 --- a/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/jiras/Surefire162CharsetProviderIT.java +++ /dev/null @@ -1,51 +0,0 @@ -package org.apache.maven.surefire.its.jiras; - -/* - * 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 java.io.File; - -import org.apache.maven.surefire.its.fixture.*; -import org.codehaus.plexus.util.FileUtils; -import org.junit.Test; - -/** - * Test charset provider (SUREFIRE-162) - * - * @author <a href="mailto:dfabul...@apache.org">Dan Fabulich</a> - */ -public class Surefire162CharsetProviderIT - extends SurefireJUnit4IntegrationTestCase -{ - @SuppressWarnings( { "ResultOfMethodCallIgnored" } ) - @Test - public void testCharsetProvider() - throws Exception - { - SurefireLauncher unpack = unpack( "/surefire-162-charsetProvider" ); - MavenLauncher maven = unpack.maven(); - OutputValidator verifier = maven.getValidator(); - File jarFile = maven.getArtifactPath( "jcharset", "jcharset", "1.2.1", "jar" ); - File pomFile = maven.getArtifactPath( "jcharset", "jcharset", "1.2.1", "pom" ); - jarFile.getParentFile().mkdirs(); - FileUtils.copyFile( verifier.getSubFile( "repo/jcharset/jcharset/1.2.1/jcharset-1.2.1.jar" ), jarFile ); - FileUtils.copyFile( verifier.getSubFile( "repo/jcharset/jcharset/1.2.1/jcharset-1.2.1.pom" ), pomFile ); - unpack.executeTest().verifyErrorFree( 1 ); - } -} http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/jiras/Surefire224WellFormedXmlFailuresIT.java ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/jiras/Surefire224WellFormedXmlFailuresIT.java b/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/jiras/Surefire224WellFormedXmlFailuresIT.java deleted file mode 100644 index 1bdb3cb..0000000 --- a/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/jiras/Surefire224WellFormedXmlFailuresIT.java +++ /dev/null @@ -1,78 +0,0 @@ -package org.apache.maven.surefire.its.jiras; - -/* - * 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.plugins.surefire.report.ReportTestCase; -import org.apache.maven.plugins.surefire.report.ReportTestSuite; -import org.apache.maven.surefire.its.fixture.HelperAssertions; -import org.apache.maven.surefire.its.fixture.OutputValidator; -import org.apache.maven.surefire.its.fixture.SurefireJUnit4IntegrationTestCase; -import org.junit.Test; - -import java.util.List; - -import static org.junit.Assert.assertEquals; - -/** - * Test Surefire-224 (XML test reports are not well-formed when failure message contains quotes) - * - * @author <a href="mailto:dfabul...@apache.org">Dan Fabulich</a> - */ -public class Surefire224WellFormedXmlFailuresIT - extends SurefireJUnit4IntegrationTestCase -{ - @SuppressWarnings("ConstantConditions") - @Test - public void testWellFormedXmlFailures() - { - OutputValidator outputValidator = unpack( "/surefire-224-wellFormedXmlFailures" ).executeTest(); - - outputValidator.assertTestSuiteResults( 4, 0, 4, 0 ); - - ReportTestSuite suite = HelperAssertions.extractReports( outputValidator.getBaseDir() ).get( 0 ); - List<org.apache.maven.plugins.surefire.report.ReportTestCase> testCases = suite.getTestCases(); - assertEquals( "Wrong number of test case objects", 4, testCases.size() ); - ReportTestCase testQuote = null, testLower = null, testGreater = null, testU0000 = null; - for ( ReportTestCase current : testCases ) - { - if ( "testQuote".equals( current.getName() ) ) - { - testQuote = current; - } - else if ( "testLower".equals( current.getName() ) ) - { - testLower = current; - } - else if ( "testGreater".equals( current.getName() ) ) - { - testGreater = current; - } - else if ( "testU0000".equals( current.getName() ) ) - { - testU0000 = current; - } - } - assertEquals( "Wrong error message", "\"", testQuote.getFailureMessage() ); - assertEquals( "Wrong error message", "<", testLower.getFailureMessage() ); - assertEquals( "Wrong error message", ">", testGreater.getFailureMessage() ); - // SUREFIRE-456 we have to doubly-escape non-visible control characters like \u0000 - assertEquals( "Wrong error message", "�", testU0000.getFailureMessage() ); - } -} http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/jiras/Surefire257NotRerunningTestsIT.java ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/jiras/Surefire257NotRerunningTestsIT.java b/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/jiras/Surefire257NotRerunningTestsIT.java deleted file mode 100644 index 2796b92..0000000 --- a/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/jiras/Surefire257NotRerunningTestsIT.java +++ /dev/null @@ -1,41 +0,0 @@ -package org.apache.maven.surefire.its.jiras; - -/* - * 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.surefire.its.fixture.SurefireJUnit4IntegrationTestCase; -import org.junit.Test; - -/** - * Test Surefire-257 Verifies that surefire does not re-run tests in site build - * - * @author Kristian Rosenvold - */ -public class Surefire257NotRerunningTestsIT - extends SurefireJUnit4IntegrationTestCase -{ - @Test - public void shouldNotRerun() - throws Exception - { - unpack( - "/surefire-257-rerunningTests" ).addSurefireReportGoal().addSurefireReportGoal().executeCurrentGoals().verifyTextInLog( - "Skipping execution of surefire because it has already been run for this configuration" ); - } -} http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/jiras/Surefire260TestWithIdenticalNamesIT.java ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/jiras/Surefire260TestWithIdenticalNamesIT.java b/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/jiras/Surefire260TestWithIdenticalNamesIT.java deleted file mode 100644 index aab3380..0000000 --- a/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/jiras/Surefire260TestWithIdenticalNamesIT.java +++ /dev/null @@ -1,72 +0,0 @@ -package org.apache.maven.surefire.its.jiras; - -/* - * 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 java.io.IOException; -import java.net.URI; - -import org.apache.maven.surefire.its.fixture.*; - -import com.gargoylesoftware.htmlunit.WebClient; -import com.gargoylesoftware.htmlunit.html.HtmlAnchor; -import com.gargoylesoftware.htmlunit.html.HtmlDivision; -import com.gargoylesoftware.htmlunit.html.HtmlPage; -import org.junit.Test; - -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertTrue; - -/** - * Test Surefire-570 Multiple report directories - * - * @author Kristian Rosenvold - */ -public class Surefire260TestWithIdenticalNamesIT - extends SurefireJUnit4IntegrationTestCase -{ - - @Test - public void testWithIdenticalNames() - throws IOException - { - SurefireLauncher surefireLauncher = unpack( "surefire-260-testWithIdenticalNames" ).failNever(); - surefireLauncher.executeTest(); - surefireLauncher.reset(); - OutputValidator validator = surefireLauncher.addSurefireReportGoal().executeCurrentGoals(); - - TestFile siteFile = validator.getSiteFile( "surefire-report.html" ); - final URI uri = siteFile.toURI(); - - final WebClient webClient = new WebClient(); - webClient.setJavaScriptEnabled( true ); - final HtmlPage page = webClient.getPage( uri.toURL() ); - - final HtmlAnchor a = - (HtmlAnchor) page.getByXPath( "//a[@href = \"javascript:toggleDisplay('surefire260.TestB.testDup');\"]" ) - .get( 0 ); - final HtmlDivision content = (HtmlDivision) page.getElementById( "surefire260.TestB.testDup-failure" ); - assertNotNull( content ); - assertTrue( content.getAttribute( "style" ).contains( "none" ) ); - a.click(); - assertFalse( content.getAttribute( "style" ).contains( "none" ) ); - webClient.closeAllWindows(); - } -} http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/jiras/Surefire34SecurityManagerIT.java ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/jiras/Surefire34SecurityManagerIT.java b/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/jiras/Surefire34SecurityManagerIT.java deleted file mode 100644 index bb80aec..0000000 --- a/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/jiras/Surefire34SecurityManagerIT.java +++ /dev/null @@ -1,48 +0,0 @@ -package org.apache.maven.surefire.its.jiras; - -/* - * 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.surefire.its.fixture.SurefireJUnit4IntegrationTestCase; -import org.apache.maven.surefire.its.fixture.SurefireLauncher; -import org.junit.Test; - -/** - * SUREFIRE-621 Asserts proper test counts when running junit 3 tests in parallel - * - * @author Kristian Rosenvold - */ -public class Surefire34SecurityManagerIT - extends SurefireJUnit4IntegrationTestCase -{ - @Test - public void testSecurityManager() - { - SurefireLauncher surefireLauncher = unpack( "surefire-34-securityManager" ).failNever(); - surefireLauncher.executeTest().assertTestSuiteResults( 2, 1, 0, 0 ); - } - - @Test - public void testSecurityManagerSuccessful() - { - SurefireLauncher surefireLauncher = unpack( "surefire-34-securityManager-success" ); - surefireLauncher.executeTest().assertTestSuiteResults( 2, 0, 0, 0 ); - } - -} http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/jiras/Surefire376TestNgAfterSuiteFailureIT.java ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/jiras/Surefire376TestNgAfterSuiteFailureIT.java b/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/jiras/Surefire376TestNgAfterSuiteFailureIT.java deleted file mode 100644 index ebc0e1e..0000000 --- a/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/jiras/Surefire376TestNgAfterSuiteFailureIT.java +++ /dev/null @@ -1,44 +0,0 @@ -package org.apache.maven.surefire.its.jiras; - -/* - * 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.surefire.its.fixture.SurefireJUnit4IntegrationTestCase; -import org.junit.Test; - -/** - * Test Surefire-376 (TestNG @AfterSuite failures are ignored) - * - * @author <a href="mailto:dfabul...@apache.org">Dan Fabulich</a> - */ -public class Surefire376TestNgAfterSuiteFailureIT - extends SurefireJUnit4IntegrationTestCase -{ - @Test - public void testAfterSuiteFailure() - { - unpack( "/testng-afterSuiteFailure" ) - .maven() - .sysProp( "testNgVersion", "5.7" ) - .sysProp( "testNgClassifier", "jdk15" ) - .withFailure() - .executeTest() - .assertTestSuiteResults( 2, 0, 1, 0 ); - } -} http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/jiras/Surefire377TestNgAndJUnitTogetherIT.java ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/jiras/Surefire377TestNgAndJUnitTogetherIT.java b/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/jiras/Surefire377TestNgAndJUnitTogetherIT.java deleted file mode 100644 index a29d030..0000000 --- a/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/jiras/Surefire377TestNgAndJUnitTogetherIT.java +++ /dev/null @@ -1,52 +0,0 @@ -package org.apache.maven.surefire.its.jiras; - -/* - * 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.surefire.its.fixture.SurefireJUnit4IntegrationTestCase; -import org.junit.Test; - -/** - * SUREFIRE-377 (When JUnit and TestNG tests are in same project, only one set gets run). - * - * @author <a href="mailto:dfabul...@apache.org">Dan Fabulich</a> - */ -public class Surefire377TestNgAndJUnitTogetherIT - extends SurefireJUnit4IntegrationTestCase -{ - @Test - public void testTestNgAndJUnitTogether() - { - unpack( "/testng-junit-together" ) - .sysProp( "testNgVersion", "5.7" ) - .sysProp( "testNgClassifier", "jdk15" ) - .executeTest() - .verifyErrorFree( 2 ); - } - - @Test - public void testTestNgAndJUnit4Together() - { - unpack( "/testng-junit4-together" ) - .sysProp( "testNgVersion", "5.7" ) - .sysProp( "testNgClassifier", "jdk15" ) - .executeTest() - .verifyErrorFree( 3 ); - } -} http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/jiras/Surefire408ManualProviderSelectionIT.java ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/jiras/Surefire408ManualProviderSelectionIT.java b/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/jiras/Surefire408ManualProviderSelectionIT.java deleted file mode 100644 index 3287ab4..0000000 --- a/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/jiras/Surefire408ManualProviderSelectionIT.java +++ /dev/null @@ -1,42 +0,0 @@ -package org.apache.maven.surefire.its.jiras; - -/* - * 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.surefire.its.fixture.SurefireJUnit4IntegrationTestCase; -import org.junit.Test; - -/** - * SUREFIRE-613 Asserts proper test counts when running in parallel - * - * @author Kristian Rosenvold - */ -public class Surefire408ManualProviderSelectionIT - extends SurefireJUnit4IntegrationTestCase -{ - @Test - public void testParallelBuildResultCount() - { - unpack( "/surefire-408-manual-provider-selection" ) - .showErrorStackTraces() - .debugLogging() - .executeTest() - .verifyTextInLog( "Using configured provider org.apache.maven.surefire.junit.JUnit3Provider" ); - } -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/jiras/Surefire42NotExtendingTestCaseIT.java ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/jiras/Surefire42NotExtendingTestCaseIT.java b/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/jiras/Surefire42NotExtendingTestCaseIT.java deleted file mode 100644 index 00c2aee..0000000 --- a/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/jiras/Surefire42NotExtendingTestCaseIT.java +++ /dev/null @@ -1,38 +0,0 @@ -package org.apache.maven.surefire.its.jiras; - -/* - * 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.surefire.its.fixture.SurefireJUnit4IntegrationTestCase; -import org.junit.Test; - -/** - * Test JUnit test that contains inner classes - * - * @author <a href="mailto:dfabul...@apache.org">Dan Fabulich</a> - */ -public class Surefire42NotExtendingTestCaseIT - extends SurefireJUnit4IntegrationTestCase -{ - @Test - public void testInnerClass() - { - executeErrorFreeTest( "junit-notExtendingTestCase", 1 ); - } -} http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/jiras/Surefire44InnerClassTestIT.java ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/jiras/Surefire44InnerClassTestIT.java b/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/jiras/Surefire44InnerClassTestIT.java deleted file mode 100644 index 928019a..0000000 --- a/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/jiras/Surefire44InnerClassTestIT.java +++ /dev/null @@ -1,38 +0,0 @@ -package org.apache.maven.surefire.its.jiras; - -/* - * 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.surefire.its.fixture.SurefireJUnit4IntegrationTestCase; -import org.junit.Test; - -/** - * Test JUnit test that contains inner classes - * - * @author <a href="mailto:dfabul...@apache.org">Dan Fabulich</a> - */ -public class Surefire44InnerClassTestIT - extends SurefireJUnit4IntegrationTestCase -{ - @Test - public void testInnerClass() - { - executeErrorFreeTest( "/junit-innerClass", 1 ); - } -} http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/jiras/Surefire500PuzzlingErrorIT.java ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/jiras/Surefire500PuzzlingErrorIT.java b/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/jiras/Surefire500PuzzlingErrorIT.java deleted file mode 100644 index 9356f68..0000000 --- a/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/jiras/Surefire500PuzzlingErrorIT.java +++ /dev/null @@ -1,42 +0,0 @@ -package org.apache.maven.surefire.its.jiras; - -/* - * 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.surefire.its.fixture.OutputValidator; -import org.apache.maven.surefire.its.fixture.SurefireJUnit4IntegrationTestCase; -import org.apache.maven.surefire.its.fixture.TestFile; -import org.junit.Test; - -/** - * SUREFIRE-500 Asserts correct error handling for the "odd" surefire-500 (and 625) issues. - * - * @author Kristian Rosenvold - */ -public class Surefire500PuzzlingErrorIT - extends SurefireJUnit4IntegrationTestCase -{ - @Test - public void testBuildFailingWhenErrors() - { - OutputValidator outputValidator = unpack( "/surefire-500-puzzling-error" ).failNever().executeTest(); - TestFile surefireReportsFile = outputValidator.getSurefireReportsFile( "surefire500.ExplodingTest.txt" ); - surefireReportsFile.assertContainsText( "java.lang.NoClassDefFoundError: whoops!" ); - } -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/jiras/Surefire510TestClassPathForkModesIT.java ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/jiras/Surefire510TestClassPathForkModesIT.java b/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/jiras/Surefire510TestClassPathForkModesIT.java deleted file mode 100644 index 4e4fd13..0000000 --- a/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/jiras/Surefire510TestClassPathForkModesIT.java +++ /dev/null @@ -1,53 +0,0 @@ -package org.apache.maven.surefire.its.jiras; - -/* - * 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.surefire.its.fixture.SurefireJUnit4IntegrationTestCase; -import org.apache.maven.surefire.its.fixture.SurefireLauncher; -import org.junit.Test; - -/** - * SUREFIRE-621 Asserts proper test counts when running junit 3 tests in parallel - * - * @author Kristian Rosenvold - */ -public class Surefire510TestClassPathForkModesIT - extends SurefireJUnit4IntegrationTestCase -{ - - @Test - public void testForkAlways() - { - unpack().forkAlways().executeTest(). - verifyTextInLog( "tcp is set" ); - } - - @Test - public void testForkOnce() - { - unpack().forkOnce().executeTest(). - verifyTextInLog( "tcp is set" ); - } - - public SurefireLauncher unpack() - { - return unpack( "/surefire-510-testClassPath" ); - } -} http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/jiras/Surefire569RunTestFromDependencyJarsIT.java ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/jiras/Surefire569RunTestFromDependencyJarsIT.java b/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/jiras/Surefire569RunTestFromDependencyJarsIT.java deleted file mode 100644 index 3e53cca..0000000 --- a/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/jiras/Surefire569RunTestFromDependencyJarsIT.java +++ /dev/null @@ -1,44 +0,0 @@ -package org.apache.maven.surefire.its.jiras; - -/* - * 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.surefire.its.fixture.OutputValidator; -import org.apache.maven.surefire.its.fixture.SurefireJUnit4IntegrationTestCase; -import org.apache.maven.surefire.its.fixture.SurefireLauncher; -import org.junit.Test; - -/** - * SUREFIRE-569 Add support for scanning Dependencies for TestClasses - * - * @author Aslak Knutsen - */ -public class Surefire569RunTestFromDependencyJarsIT - extends SurefireJUnit4IntegrationTestCase { - - @Test - public void shouldScanAndRunTestsInDependencyJars() throws Exception { - SurefireLauncher launcher = unpack( "surefire-569-RunTestFromDependencyJars" ); - launcher.addGoal("test").addGoal("install"); - launcher.executeCurrentGoals(); - - OutputValidator module1 = launcher.getSubProjectValidator("module1"); - module1.assertTestSuiteResults(1, 0, 0, 0); - } -} http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/jiras/Surefire570MultipleReportDirectoriesIT.java ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/jiras/Surefire570MultipleReportDirectoriesIT.java b/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/jiras/Surefire570MultipleReportDirectoriesIT.java deleted file mode 100644 index a9b437e..0000000 --- a/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/jiras/Surefire570MultipleReportDirectoriesIT.java +++ /dev/null @@ -1,68 +0,0 @@ -package org.apache.maven.surefire.its.jiras; - -/* - * 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.surefire.its.fixture.*; -import org.junit.Test; - -/** - * Test Surefire-570 Multiple report directories - * - * @author Kristian Rosenvold - */ -public class Surefire570MultipleReportDirectoriesIT - extends SurefireJUnit4IntegrationTestCase -{ - - @Test - public void testReportWithAggregate() - throws Exception - { - - SurefireLauncher surefireLauncher = unpack().failNever(); - surefireLauncher.executeTest(); - surefireLauncher.addGoal( "-Daggregate=true" ); - OutputValidator validator = surefireLauncher.executeSurefireReport( ); - TestFile siteFile = validator.getSiteFile( "surefire-report.html" ); - siteFile.assertContainsText( "MyModule1ClassTest" ); - siteFile.assertContainsText( "MyModule2ClassTest" ); - siteFile.assertContainsText( "MyDummyClassM1Test" ); - } - - @Test - public void testReportWithoutAggregate() - throws Exception - { - SurefireLauncher surefireLauncher = unpack().failNever(); - surefireLauncher.executeTest(); - surefireLauncher.reset(); - surefireLauncher.executeSurefireReport( ); - OutputValidator module1 = surefireLauncher.getSubProjectValidator( "module1" ); - TestFile siteFile = module1.getSiteFile( "surefire-report.html" ); - siteFile.assertContainsText( "MyModule1ClassTest" ); - siteFile.assertContainsText( "MyDummyClassM1Test" ); - } - - public SurefireLauncher unpack() - { - return unpack( "/surefire-570-multipleReportDirectories" ); - } - -} http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/jiras/Surefire613TestCountInParallelIT.java ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/jiras/Surefire613TestCountInParallelIT.java b/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/jiras/Surefire613TestCountInParallelIT.java deleted file mode 100644 index 7b74409..0000000 --- a/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/jiras/Surefire613TestCountInParallelIT.java +++ /dev/null @@ -1,45 +0,0 @@ -package org.apache.maven.surefire.its.jiras; - -/* - * 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.surefire.its.fixture.OutputValidator; -import org.apache.maven.surefire.its.fixture.SurefireJUnit4IntegrationTestCase; -import org.junit.Test; - -/** - * SUREFIRE-613 Asserts proper test counts when running in parallel - * - * @author Kristian Rosenvold - */ -public class Surefire613TestCountInParallelIT - extends SurefireJUnit4IntegrationTestCase -{ - @Test - public void testParallelBuildResultCount() - { - OutputValidator validator = unpack( "/surefire-613-testCount-in-parallel" ).failNever().executeTest(); - - validator.verifyTextInLog( "testAllok to stdout" ); - validator.verifyTextInLog( "testAllok to stderr" ); - validator.verifyTextInLog( "testWithException1 to stdout" ); - validator.verifyTextInLog( "testWithException1 to stderr" ); - validator.assertTestSuiteResults( 30, 8, 4, 17 ); - } -} http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/jiras/Surefire621TestCountingJunit3InParallelIT.java ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/jiras/Surefire621TestCountingJunit3InParallelIT.java b/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/jiras/Surefire621TestCountingJunit3InParallelIT.java deleted file mode 100644 index a47b9d8..0000000 --- a/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/jiras/Surefire621TestCountingJunit3InParallelIT.java +++ /dev/null @@ -1,98 +0,0 @@ -package org.apache.maven.surefire.its.jiras; - -/* - * 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.surefire.its.fixture.SurefireJUnit4IntegrationTestCase; -import org.junit.Test; - -/** - * SUREFIRE-621 Asserts proper test counts when running junit 3 tests in parallel<br> - * SUREFIRE-1264 Some tests can be lost when running in parallel with parameterized tests<br> - * <br> - * Removed decision making with JUnit3 in {@code TestSet} class during Jira activity of <tt>SUREFIRE-1264</tt> - * which results in one hot spot where the test class is determined (see JUnitCoreRunListener#fillTestCountMap()). - * - * @author Kristian Rosenvold - * @author <a href="mailto:tibordig...@apache.org">Tibor Digana (tibor17)</a> - */ -public class Surefire621TestCountingJunit3InParallelIT - extends SurefireJUnit4IntegrationTestCase -{ - /** - * SUREFIRE-1264 - */ - @Test - public void testJunit3AllParallelBuildResultCount() - { - unpack( "surefire-621-testCounting-junit3-in-parallel" ) - .activateProfile( "all-parallel-junit3-testcases" ) - .execute( "integration-test" ) - .assertTestSuiteResults( 6, 0, 0, 0 ); - } - - /** - * SUREFIRE-621 - */ - @Test - public void testJunit3ParallelBuildResultCount() - { - unpack( "surefire-621-testCounting-junit3-in-parallel" ) - .failNever() - .activateProfile( "parallel-junit3-testcases" ) - .execute( "install" ) - .assertTestSuiteResults( 6, 0, 0, 0 ); - } - - /** - * SUREFIRE-1264 - */ - @Test - public void testJunit3BuildResultCount() - { - unpack( "surefire-621-testCounting-junit3-in-parallel" ) - .activateProfile( "junit3-testcases" ) - .execute( "integration-test" ) - .assertTestSuiteResults( 6, 0, 0, 0 ); - } - - /** - * SUREFIRE-1264 - */ - @Test - public void testJunit3ParallelSuiteBuildResultCount() - { - unpack( "surefire-621-testCounting-junit3-in-parallel" ) - .activateProfile( "parallel-junit3-testsuite" ) - .execute( "integration-test" ) - .assertTestSuiteResults( 6, 0, 0, 0 ); - } - - /** - * SUREFIRE-1264 - */ - @Test - public void testJunit3SuiteBuildResultCount() - { - unpack( "surefire-621-testCounting-junit3-in-parallel" ) - .activateProfile( "junit3-testsuite" ) - .execute( "integration-test" ) - .assertTestSuiteResults( 6, 0, 0, 0 ); - } -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/jiras/Surefire628ConsoleOutputBeforeAndAfterClassIT.java ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/jiras/Surefire628ConsoleOutputBeforeAndAfterClassIT.java b/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/jiras/Surefire628ConsoleOutputBeforeAndAfterClassIT.java deleted file mode 100644 index 27f9572..0000000 --- a/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/jiras/Surefire628ConsoleOutputBeforeAndAfterClassIT.java +++ /dev/null @@ -1,48 +0,0 @@ -package org.apache.maven.surefire.its.jiras; - -/* - * 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.surefire.its.fixture.OutputValidator; -import org.apache.maven.surefire.its.fixture.SurefireJUnit4IntegrationTestCase; -import org.junit.Test; - -/** - * Asserts that console output always goes somewhere ;) - * - * @author Kristian Rosenvold assertContainsText - */ -public class Surefire628ConsoleOutputBeforeAndAfterClassIT - extends SurefireJUnit4IntegrationTestCase -{ - - @Test - public void testJunit3ParallelBuildResultCount() - { - OutputValidator validator = - unpack( "surefire-628-consoleoutputbeforeandafterclass" ).failNever().parallelMethods().executeTest(); - - validator.verifyTextInLog( "628Test1" ); - validator.verifyTextInLog( "Before628Test1" ); - validator.verifyTextInLog( "After628Test1" ); - validator.verifyTextInLog( "628Test2" ); - validator.verifyTextInLog( "BeforeClass628Test2" ); - validator.verifyTextInLog( "AfterClass628Test2" ); - } -} http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/jiras/Surefire634UnsettableSystemPropertiesWarningIT.java ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/jiras/Surefire634UnsettableSystemPropertiesWarningIT.java b/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/jiras/Surefire634UnsettableSystemPropertiesWarningIT.java deleted file mode 100644 index 778e776..0000000 --- a/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/jiras/Surefire634UnsettableSystemPropertiesWarningIT.java +++ /dev/null @@ -1,39 +0,0 @@ -package org.apache.maven.surefire.its.jiras; - -/* - * 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.surefire.its.fixture.SurefireJUnit4IntegrationTestCase; -import org.junit.Test; - -/** - * SUREFIRE-634 Verifies error message on unsettable system properties - * - * @author Kristian Rosenvold - */ -public class Surefire634UnsettableSystemPropertiesWarningIT - extends SurefireJUnit4IntegrationTestCase -{ - @Test - public void testJunit3ParallelBuildResultCount() - { - unpack( "/surefire-634-systemPropertiesWarning" ).executeTest().verifyTextInLog( - "java.library.path cannot be set as system property" ); - } -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/jiras/Surefire649EmptyStringSystemPropertiesIT.java ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/jiras/Surefire649EmptyStringSystemPropertiesIT.java b/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/jiras/Surefire649EmptyStringSystemPropertiesIT.java deleted file mode 100644 index d6f0a0e..0000000 --- a/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/jiras/Surefire649EmptyStringSystemPropertiesIT.java +++ /dev/null @@ -1,84 +0,0 @@ -package org.apache.maven.surefire.its.jiras; - -/* - * 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.apache.maven.surefire.its.fixture.SurefireLauncher; -import org.junit.Test; - -import static org.junit.Assert.fail; - -/** - * @author <a href="mailto:tibordig...@apache.org">Tibor Digana (tibor17)</a> - * @see <a href="https://issues.apache.org/jira/browse/SUREFIRE-649">SUREFIRE-649</a> - * @since 2.18 - */ -public class Surefire649EmptyStringSystemPropertiesIT - extends SurefireJUnit4IntegrationTestCase -{ - - @Test - public void systemProperties() - throws VerificationException - { - SurefireLauncher launcher = unpack1(); - - OutputValidator validator = launcher.executeTest().verifyErrorFree( 1 ); - - for ( String line : validator.loadLogLines() ) - { - if ( "emptyProperty=''".equals( line ) ) - { - return; - } - } - fail("Could not find text in log: emptyProperty=''"); - } - - @Test - public void systemPropertyVariables() - throws VerificationException - { - SurefireLauncher launcher = unpack2(); - - OutputValidator validator = launcher.executeTest().verifyErrorFree( 1 ); - - for ( String line : validator.loadLogLines() ) - { - if ( "emptyProperty=''".equals( line ) ) - { - return; - } - } - fail("Could not find text in log: emptyProperty=''"); - } - - private SurefireLauncher unpack1() - { - return unpack( "surefire-649-systemProperties" ); - } - - private SurefireLauncher unpack2() - { - return unpack( "surefire-649-systemPropertyVariables" ); - } -} http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/jiras/Surefire673MockitoIT.java ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/jiras/Surefire673MockitoIT.java b/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/jiras/Surefire673MockitoIT.java deleted file mode 100644 index 7f3e2ca..0000000 --- a/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/jiras/Surefire673MockitoIT.java +++ /dev/null @@ -1,38 +0,0 @@ -package org.apache.maven.surefire.its.jiras; - -/* - * 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.surefire.its.fixture.SurefireJUnit4IntegrationTestCase; -import org.junit.Test; - -/** - * SUREFIRE-673 Asserts that a given mockito build works as it should (classloader problem in 2.7) - * - * @author Kristian Rosenvold - */ -public class Surefire673MockitoIT - extends SurefireJUnit4IntegrationTestCase -{ - @Test - public void testBuildFailingWhenErrors() - { - unpack( "/surefire-673-mockito" ).executeTest().verifyErrorFreeLog(); - } -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/jiras/Surefire674BuildFailingWhenErrorsIT.java ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/jiras/Surefire674BuildFailingWhenErrorsIT.java b/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/jiras/Surefire674BuildFailingWhenErrorsIT.java deleted file mode 100644 index 5aa342f..0000000 --- a/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/jiras/Surefire674BuildFailingWhenErrorsIT.java +++ /dev/null @@ -1,39 +0,0 @@ -package org.apache.maven.surefire.its.jiras; - -/* - * 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.surefire.its.fixture.SurefireJUnit4IntegrationTestCase; -import org.junit.Test; - -/** - * SUREFIRE-674 Asserts that the build fails when tests have errors - * - * @author Kristian Rosenvold - */ -public class Surefire674BuildFailingWhenErrorsIT - extends SurefireJUnit4IntegrationTestCase -{ - @Test - public void testBuildFailingWhenErrors() - { - unpack( "/surefire-674-buildFailingWhenErrors" ).maven().withFailure().executeTest().verifyTextInLog( - "BUILD FAILURE" ); - } -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/jiras/Surefire674BuildFailingWhenFailsafeErrorsIT.java ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/jiras/Surefire674BuildFailingWhenFailsafeErrorsIT.java b/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/jiras/Surefire674BuildFailingWhenFailsafeErrorsIT.java deleted file mode 100644 index 57c8648..0000000 --- a/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/jiras/Surefire674BuildFailingWhenFailsafeErrorsIT.java +++ /dev/null @@ -1,38 +0,0 @@ -package org.apache.maven.surefire.its.jiras; - -/* - * 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.surefire.its.fixture.SurefireJUnit4IntegrationTestCase; -import org.junit.Test; - -/** - * SUREFIRE-674 Asserts that the build fails when tests have errors - * - * @author Kristian Rosenvold - */ -public class Surefire674BuildFailingWhenFailsafeErrorsIT - extends SurefireJUnit4IntegrationTestCase -{ - @Test - public void testBuildFailingWhenErrors() - { - unpack( "/failsafe-buildfail" ).maven().withFailure().executeVerify().verifyTextInLog( "BUILD FAILURE" ); - } -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/jiras/Surefire685CommaSeparatedIncludesIT.java ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/jiras/Surefire685CommaSeparatedIncludesIT.java b/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/jiras/Surefire685CommaSeparatedIncludesIT.java deleted file mode 100644 index 3d7a684..0000000 --- a/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/jiras/Surefire685CommaSeparatedIncludesIT.java +++ /dev/null @@ -1,38 +0,0 @@ -package org.apache.maven.surefire.its.jiras; - -/* - * 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.surefire.its.fixture.SurefireJUnit4IntegrationTestCase; -import org.junit.Test; - -/** - * SUREFIRE-685 Asserts that only the specified tests are run with comma separated includes - * - * @author Kristian Rosenvold - */ -public class Surefire685CommaSeparatedIncludesIT - extends SurefireJUnit4IntegrationTestCase -{ - @Test - public void testBuildFailingWhenErrors() - { - executeErrorFreeTest( "/surefire-685-commaseparatedIncludes", 2 ); - } -}