http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/surefire-847-testngfail/pom.xml ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/surefire-847-testngfail/pom.xml b/surefire-integration-tests/src/test/resources/surefire-847-testngfail/pom.xml deleted file mode 100644 index 18cb679..0000000 --- a/surefire-integration-tests/src/test/resources/surefire-847-testngfail/pom.xml +++ /dev/null @@ -1,60 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - ~ 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. - --> -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - <modelVersion>4.0.0</modelVersion> - <groupId>org.codehaus.jira</groupId> - <artifactId>surefire-847</artifactId> - <version>0.0.1-SNAPSHOT</version> - <dependencies> - <dependency> - <groupId>com.google.inject</groupId> - <artifactId>guice</artifactId> - <version>3.0</version> - <classifier>no_aop</classifier> - <scope>test</scope> - </dependency> - <dependency> - <groupId>org.testng</groupId> - <artifactId>testng</artifactId> - <version>6.5.1</version> - <scope>test</scope> - </dependency> - </dependencies> - <build> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-surefire-plugin</artifactId> - <version>${surefire.version}</version> - <configuration> - <trimStackTrace>false</trimStackTrace> - <workingDirectory>${project.build.directory}/test-classes</workingDirectory> - </configuration> - </plugin> - - </plugins> - </build> - <properties> - <defaultSuiteFile>${basedir}/src/test/resources/suite.xml</defaultSuiteFile> - <maven.compiler.source>1.7</maven.compiler.source> - <maven.compiler.target>1.7</maven.compiler.target> - </properties> -</project>
http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/surefire-847-testngfail/src/test/java/org/codehaus/SomeFailedTest.java ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/surefire-847-testngfail/src/test/java/org/codehaus/SomeFailedTest.java b/surefire-integration-tests/src/test/resources/surefire-847-testngfail/src/test/java/org/codehaus/SomeFailedTest.java deleted file mode 100644 index 5e6a3da..0000000 --- a/surefire-integration-tests/src/test/resources/surefire-847-testngfail/src/test/java/org/codehaus/SomeFailedTest.java +++ /dev/null @@ -1,32 +0,0 @@ -package org.codehaus; - -/* - * 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.testng.Assert; -import org.testng.annotations.Test; - -@Test -public class SomeFailedTest { - - @Test - public void failedTest() { - Assert.assertFalse(true); - } -} http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/surefire-847-testngfail/src/test/java/org/codehaus/SomePassedTest.java ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/surefire-847-testngfail/src/test/java/org/codehaus/SomePassedTest.java b/surefire-integration-tests/src/test/resources/surefire-847-testngfail/src/test/java/org/codehaus/SomePassedTest.java deleted file mode 100644 index 737f070..0000000 --- a/surefire-integration-tests/src/test/resources/surefire-847-testngfail/src/test/java/org/codehaus/SomePassedTest.java +++ /dev/null @@ -1,34 +0,0 @@ -package org.codehaus; - -/* - * 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.testng.Assert; -import org.testng.annotations.Test; - - -public class SomePassedTest { - - @Test - public void passedTestA(){ - Assert.assertTrue(true); - } - - -} http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/surefire-847-testngfail/src/test/resources/suite.xml ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/surefire-847-testngfail/src/test/resources/suite.xml b/surefire-integration-tests/src/test/resources/surefire-847-testngfail/src/test/resources/suite.xml deleted file mode 100644 index 56de750..0000000 --- a/surefire-integration-tests/src/test/resources/surefire-847-testngfail/src/test/resources/suite.xml +++ /dev/null @@ -1,8 +0,0 @@ -<suite name="BaseSuite" verbose="1" parallel="classes" - thread-count="2"> - <test name="SUREFIRE-847" preserve-order="false"> - <packages> - <package name="org.codehaus"/> - </packages> - </test> -</suite> http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/surefire-855-failsafe-use-bundle/pom.xml ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/surefire-855-failsafe-use-bundle/pom.xml b/surefire-integration-tests/src/test/resources/surefire-855-failsafe-use-bundle/pom.xml deleted file mode 100644 index e0d4ee2..0000000 --- a/surefire-integration-tests/src/test/resources/surefire-855-failsafe-use-bundle/pom.xml +++ /dev/null @@ -1,127 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - ~ 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. - --> -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.apache.maven.surefire</groupId> - <artifactId>it-parent</artifactId> - <version>1.0</version> - <relativePath>../pom.xml</relativePath> - </parent> - <groupId>org.apache.maven.plugins.surefire</groupId> - <artifactId>jiras-surefire-855-bundle</artifactId> - <version>1.0</version> - <packaging>bundle</packaging> - <url>http://maven.apache.org</url> - <developers> - <developer> - <id>tibordigana</id> - <name>Tibor DigaÅa (tibor17)</name> - <email>tibordig...@apache.org</email> - <roles> - <role>Committer</role> - </roles> - <timezone>Europe/Bratislava</timezone> - </developer> - </developers> - <dependencies> - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>4.11</version> - <scope>test</scope> - </dependency> - <dependency> - <groupId>org.easytesting</groupId> - <artifactId>fest-assert-core</artifactId> - <version>2.0M9</version> - <scope>test</scope> - </dependency> - <dependency> - <groupId>org.hamcrest</groupId> - <artifactId>hamcrest-library</artifactId> - <version>1.3</version> - <scope>test</scope> - </dependency> - </dependencies> - <build> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-source-plugin</artifactId> - <version>2.3</version> - <executions> - <execution> - <id>attach-sources</id> - <goals> - <goal>jar-no-fork</goal> - </goals> - </execution> - </executions> - </plugin> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-javadoc-plugin</artifactId> - <version>3.0.0</version> - <executions> - <execution> - <id>attach-javadoc</id> - <goals> - <goal>jar</goal> - </goals> - </execution> - </executions> - </plugin> - <plugin> - <groupId>org.apache.felix</groupId> - <artifactId>maven-bundle-plugin</artifactId> - <version>2.3.7</version> - <extensions>true</extensions> - <configuration> - <instructions> - <Bundle-SymbolicName>org.surefire.its.${project.artifactId}</Bundle-SymbolicName> - </instructions> - </configuration> - </plugin> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-failsafe-plugin</artifactId> - <executions> - <execution> - <id>integration-test</id> - <goals> - <goal>integration-test</goal> - </goals> - </execution> - <execution> - <id>verify</id> - <goals> - <goal>verify</goal> - </goals> - </execution> - </executions> - <configuration> - <forkMode>always</forkMode> - </configuration> - </plugin> - </plugins> - </build> -</project> http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/surefire-855-failsafe-use-bundle/src/main/java/pkg/AClassInOSGiBundle.java ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/surefire-855-failsafe-use-bundle/src/main/java/pkg/AClassInOSGiBundle.java b/surefire-integration-tests/src/test/resources/surefire-855-failsafe-use-bundle/src/main/java/pkg/AClassInOSGiBundle.java deleted file mode 100644 index 48141e6..0000000 --- a/surefire-integration-tests/src/test/resources/surefire-855-failsafe-use-bundle/src/main/java/pkg/AClassInOSGiBundle.java +++ /dev/null @@ -1,24 +0,0 @@ -package pkg; - -/* - * 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. - */ - -public class AClassInOSGiBundle -{ -} http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/surefire-855-failsafe-use-bundle/src/main/resources/main/surefire855.properties ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/surefire-855-failsafe-use-bundle/src/main/resources/main/surefire855.properties b/surefire-integration-tests/src/test/resources/surefire-855-failsafe-use-bundle/src/main/resources/main/surefire855.properties deleted file mode 100644 index 690842d..0000000 --- a/surefire-integration-tests/src/test/resources/surefire-855-failsafe-use-bundle/src/main/resources/main/surefire855.properties +++ /dev/null @@ -1 +0,0 @@ -issue=SUREFIRE-855 http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/surefire-855-failsafe-use-bundle/src/test/java/jiras/surefre855/bundle/FooIT.java ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/surefire-855-failsafe-use-bundle/src/test/java/jiras/surefre855/bundle/FooIT.java b/surefire-integration-tests/src/test/resources/surefire-855-failsafe-use-bundle/src/test/java/jiras/surefre855/bundle/FooIT.java deleted file mode 100644 index e5cbffa..0000000 --- a/surefire-integration-tests/src/test/resources/surefire-855-failsafe-use-bundle/src/test/java/jiras/surefre855/bundle/FooIT.java +++ /dev/null @@ -1,166 +0,0 @@ -package jiras.surefire855.bundle; - -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -import org.junit.Test; - -import java.io.File; -import java.io.FileFilter; -import java.io.IOException; -import java.io.InputStream; -import java.io.StringReader; -import java.util.Properties; -import java.util.jar.JarFile; -import java.util.jar.Manifest; - -import static org.fest.assertions.api.Assertions.assertThat; -import static org.fest.assertions.api.Assertions.contentOf; -import static org.hamcrest.Matchers.*; -import static org.hamcrest.MatcherAssert.assertThat; - -public final class FooIT -{ - private static final String ARTIFACT_FILE_NAME = "jiras-surefire-855-bundle-1.0.jar"; - - private static final String MAIN_RESOURCE = "/main/surefire855.properties"; - - private static final String TEST_RESOURCE = "/jiras/surefire855/bundle/properties/surefire855.properties"; - - private static File surefireDir() - throws IOException - { - String bootPath = System.getProperty( "surefire.real.class.path" ); - return bootPath == null ? null : new File( bootPath ).getParentFile(); - } - - private static File[] surefireProviderProperties() - throws IOException - { - return surefireDir().listFiles( new FileFilter() - { - public boolean accept( File pathname ) - { - try - { - return isSurefireProviderProperties( pathname ); - } - catch ( IOException e ) - { - return false; - } - } - } ); - } - - /** - * See BooterSerializer#serialize(). - */ - private static boolean isSurefireProviderProperties( File pathname ) - throws IOException - { - pathname = pathname.getCanonicalFile(); - String fileName = pathname.getName(); - return pathname.isFile() && fileName.startsWith( "surefire" ) && !fileName.startsWith( "surefire_" ) - && fileName.endsWith( "tmp" ); - } - - private static boolean isSurefireBooter( File pathname ) - throws IOException - { - pathname = pathname.getCanonicalFile(); - String fileName = pathname.getName(); - return pathname.isFile() && fileName.startsWith( "surefirebooter" ) && fileName.endsWith( ".jar" ); - } - - private static String manifestClassPath( Class clazz ) - throws IOException - { - File booter = new File( System.getProperty( "surefire.real.class.path" ) ); - assertThat( booter ).exists(); - assertThat( booter ).isFile(); - JarFile jarFile = new JarFile( booter ); - try - { - Manifest manifest = jarFile.getManifest(); - return manifest.getMainAttributes().getValue( "Class-Path" ); - } - finally - { - jarFile.close(); - } - } - - private static Properties loadProperties( Class clazz, String resourcePath ) - throws IOException - { - InputStream is = clazz.getResourceAsStream( resourcePath ); - Properties prop = new Properties(); - prop.load( is ); - is.close(); - return prop; - } - - private static Properties loadMainProperties( Class clazz ) - throws IOException - { - return loadProperties( clazz, MAIN_RESOURCE ); - } - - private static Properties loadTestProperties( Class clazz ) - throws IOException - { - return loadProperties( clazz, TEST_RESOURCE ); - } - - @Test - public void test() - throws IOException - { - String classPath = manifestClassPath( getClass() ); - System.out.println( "CLASS PATH:" ); - System.out.println( classPath ); - - assertThat( classPath, not( containsString( "/target/classes" ) ) ); - assertThat( classPath, containsString( "/target/" + ARTIFACT_FILE_NAME ) ); - - File[] descriptors = surefireProviderProperties(); - assertThat( descriptors ).hasSize( 1 ); - assertThat( descriptors ).doesNotContainNull(); - assertThat( descriptors[0] ).isFile(); - - String surefireProperties = contentOf( descriptors[0] ); - Properties properties = new Properties(); - properties.load( new StringReader( surefireProperties ) ); - System.out.println( properties.toString() ); - File actualArtifact = new File( properties.getProperty( "classPathUrl.1" ) ).getCanonicalFile(); - File expectedArtifact = new File( "target/" + ARTIFACT_FILE_NAME ).getCanonicalFile(); - assertThat( actualArtifact ).isFile(); - assertThat( expectedArtifact ).isFile(); - assertThat( actualArtifact ).isEqualTo( expectedArtifact ); - } - - @Test - public void shouldAlwaysHaveResources() - throws IOException - { - assertThat( loadTestProperties( getClass() ).getProperty( "issue" ), is( "SUREFIRE-855" ) ); - assertThat( loadMainProperties( getClass() ).getProperty( "issue" ), is( "SUREFIRE-855" ) ); - } -} http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/surefire-855-failsafe-use-bundle/src/test/resources/jiras/surefire855/bundle/properties/surefire855.properties ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/surefire-855-failsafe-use-bundle/src/test/resources/jiras/surefire855/bundle/properties/surefire855.properties b/surefire-integration-tests/src/test/resources/surefire-855-failsafe-use-bundle/src/test/resources/jiras/surefire855/bundle/properties/surefire855.properties deleted file mode 100644 index 690842d..0000000 --- a/surefire-integration-tests/src/test/resources/surefire-855-failsafe-use-bundle/src/test/resources/jiras/surefire855/bundle/properties/surefire855.properties +++ /dev/null @@ -1 +0,0 @@ -issue=SUREFIRE-855 http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/surefire-855-failsafe-use-jar/pom.xml ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/surefire-855-failsafe-use-jar/pom.xml b/surefire-integration-tests/src/test/resources/surefire-855-failsafe-use-jar/pom.xml deleted file mode 100644 index 01dc71e..0000000 --- a/surefire-integration-tests/src/test/resources/surefire-855-failsafe-use-jar/pom.xml +++ /dev/null @@ -1,115 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - ~ 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. - --> -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.apache.maven.surefire</groupId> - <artifactId>it-parent</artifactId> - <version>1.0</version> - <relativePath>../pom.xml</relativePath> - </parent> - <groupId>org.apache.maven.plugins.surefire</groupId> - <artifactId>jiras-surefire-855-jar</artifactId> - <version>1.0</version> - <url>http://maven.apache.org</url> - <developers> - <developer> - <id>tibordigana</id> - <name>Tibor DigaÅa (tibor17)</name> - <email>tibordig...@apache.org</email> - <roles> - <role>Committer</role> - </roles> - <timezone>Europe/Bratislava</timezone> - </developer> - </developers> - <dependencies> - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>4.11</version> - <scope>test</scope> - </dependency> - <dependency> - <groupId>org.easytesting</groupId> - <artifactId>fest-assert-core</artifactId> - <version>2.0M9</version> - <scope>test</scope> - </dependency> - <dependency> - <groupId>org.hamcrest</groupId> - <artifactId>hamcrest-library</artifactId> - <version>1.3</version> - <scope>test</scope> - </dependency> - </dependencies> - <build> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-source-plugin</artifactId> - <version>2.3</version> - <executions> - <execution> - <id>attach-sources</id> - <goals> - <goal>jar-no-fork</goal> - </goals> - </execution> - </executions> - </plugin> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-javadoc-plugin</artifactId> - <version>3.0.0</version> - <executions> - <execution> - <id>attach-javadoc</id> - <goals> - <goal>jar</goal> - </goals> - </execution> - </executions> - </plugin> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-failsafe-plugin</artifactId> - <executions> - <execution> - <id>integration-test</id> - <goals> - <goal>integration-test</goal> - </goals> - </execution> - <execution> - <id>verify</id> - <goals> - <goal>verify</goal> - </goals> - </execution> - </executions> - <configuration> - <forkMode>${forkMode}</forkMode> - </configuration> - </plugin> - </plugins> - </build> -</project> http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/surefire-855-failsafe-use-jar/src/main/java/pkg/ToRunJavadoc.java ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/surefire-855-failsafe-use-jar/src/main/java/pkg/ToRunJavadoc.java b/surefire-integration-tests/src/test/resources/surefire-855-failsafe-use-jar/src/main/java/pkg/ToRunJavadoc.java deleted file mode 100644 index 5998fa6..0000000 --- a/surefire-integration-tests/src/test/resources/surefire-855-failsafe-use-jar/src/main/java/pkg/ToRunJavadoc.java +++ /dev/null @@ -1,8 +0,0 @@ -package pkg; - -public class ToRunJavadoc -{ - public void x() - { - } -} http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/surefire-855-failsafe-use-jar/src/main/resources/main/surefire855.properties ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/surefire-855-failsafe-use-jar/src/main/resources/main/surefire855.properties b/surefire-integration-tests/src/test/resources/surefire-855-failsafe-use-jar/src/main/resources/main/surefire855.properties deleted file mode 100644 index 690842d..0000000 --- a/surefire-integration-tests/src/test/resources/surefire-855-failsafe-use-jar/src/main/resources/main/surefire855.properties +++ /dev/null @@ -1 +0,0 @@ -issue=SUREFIRE-855 http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/surefire-855-failsafe-use-jar/src/test/java/jiras/surefire855/jar/FooIT.java ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/surefire-855-failsafe-use-jar/src/test/java/jiras/surefire855/jar/FooIT.java b/surefire-integration-tests/src/test/resources/surefire-855-failsafe-use-jar/src/test/java/jiras/surefire855/jar/FooIT.java deleted file mode 100644 index 39b8749..0000000 --- a/surefire-integration-tests/src/test/resources/surefire-855-failsafe-use-jar/src/test/java/jiras/surefire855/jar/FooIT.java +++ /dev/null @@ -1,179 +0,0 @@ -package jiras.surefire855.jar; - -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -import org.junit.Test; - -import java.io.File; -import java.io.FileFilter; -import java.io.IOException; -import java.io.InputStream; -import java.io.StringReader; -import java.util.Properties; -import java.util.jar.JarFile; -import java.util.jar.Manifest; - -import static org.fest.assertions.api.Assertions.assertThat; -import static org.fest.assertions.api.Assertions.contentOf; -import static org.hamcrest.Matchers.*; -import static org.hamcrest.MatcherAssert.assertThat; -import static org.junit.Assume.assumeThat; - -public final class FooIT -{ - private static final String ARTIFACT_FILE_NAME = "jiras-surefire-855-jar-1.0.jar"; - - private static final String MAIN_RESOURCE = "/main/surefire855.properties"; - - private static final String TEST_RESOURCE = "/jiras/surefire855/jar/properties/surefire855.properties"; - - private static File surefireDir() - throws IOException - { - String bootPath = System.getProperty( "surefire.real.class.path" ); - return bootPath == null ? null : new File( bootPath ).getParentFile(); - } - - private static File[] surefireProviderProperties() - throws IOException - { - return surefireDir().listFiles( new FileFilter() - { - public boolean accept( File pathname ) - { - try - { - return isSurefireProviderProperties( pathname ); - } - catch ( IOException e ) - { - return false; - } - } - } ); - } - - /** - * See BooterSerializer#serialize(). - */ - private static boolean isSurefireProviderProperties( File pathname ) - throws IOException - { - pathname = pathname.getCanonicalFile(); - String fileName = pathname.getName(); - return pathname.isFile() && fileName.startsWith( "surefire" ) && !fileName.startsWith( "surefire_" ) - && fileName.endsWith( "tmp" ); - } - - private static boolean isSurefireBooter( File pathname ) - throws IOException - { - pathname = pathname.getCanonicalFile(); - String fileName = pathname.getName(); - return pathname.isFile() && fileName.startsWith( "surefirebooter" ) && fileName.endsWith( ".jar" ); - } - - private static String manifestClassPath( Class clazz ) - throws IOException - { - File booter = new File( System.getProperty( "surefire.real.class.path" ) ); - assertThat( booter ).exists(); - assertThat( booter ).isFile(); - JarFile jarFile = new JarFile( booter ); - try - { - Manifest manifest = jarFile.getManifest(); - return manifest.getMainAttributes().getValue( "Class-Path" ); - } - finally - { - jarFile.close(); - } - } - - private static Properties loadProperties( Class clazz, String resourcePath ) - throws IOException - { - InputStream is = clazz.getResourceAsStream( resourcePath ); - Properties prop = new Properties(); - prop.load( is ); - is.close(); - return prop; - } - - private static Properties loadMainProperties( Class clazz ) - throws IOException - { - return loadProperties( clazz, MAIN_RESOURCE ); - } - - private static Properties loadTestProperties( Class clazz ) - throws IOException - { - return loadProperties( clazz, TEST_RESOURCE ); - } - - @Test - public void shouldBeJarWithForking() - throws IOException - { - assumeThat( System.getProperty( "forkMode" ), is( not( "never" ) ) ); - - String classPath = manifestClassPath( getClass() ); - System.out.println( "CLASS PATH:" ); - System.out.println( classPath ); - - assertThat( classPath, not( containsString( "/target/classes" ) ) ); - assertThat( classPath, containsString( "/target/" + ARTIFACT_FILE_NAME ) ); - - File[] descriptors = surefireProviderProperties(); - assertThat( descriptors ).hasSize( 1 ); - assertThat( descriptors ).doesNotContainNull(); - assertThat( descriptors[0] ).isFile(); - - String surefireProperties = contentOf( descriptors[0] ); - Properties properties = new Properties(); - properties.load( new StringReader( surefireProperties ) ); - System.out.println( properties.toString() ); - File actualArtifact = new File( properties.getProperty( "classPathUrl.1" ) ).getCanonicalFile(); - File expectedArtifact = new File( "target/" + ARTIFACT_FILE_NAME ).getCanonicalFile(); - assertThat( actualArtifact ).isFile(); - assertThat( expectedArtifact ).isFile(); - assertThat( actualArtifact ).isEqualTo( expectedArtifact ); - } - - @Test - public void jarShouldExistWhenNotForking() - throws Exception - { - assumeThat( System.getProperty( "forkMode" ), is( "never" ) ); - - assertThat( surefireDir() ).isNull(); - assertThat( new File( "target/" + ARTIFACT_FILE_NAME ).getCanonicalFile() ).isFile(); - } - - @Test - public void shouldAlwaysHaveResources() - throws IOException - { - assertThat( loadTestProperties( getClass() ).getProperty( "issue" ), is( "SUREFIRE-855" ) ); - assertThat( loadMainProperties( getClass() ).getProperty( "issue" ), is( "SUREFIRE-855" ) ); - } -} http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/surefire-855-failsafe-use-jar/src/test/resources/jiras/surefire855/jar/properties/surefire855.properties ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/surefire-855-failsafe-use-jar/src/test/resources/jiras/surefire855/jar/properties/surefire855.properties b/surefire-integration-tests/src/test/resources/surefire-855-failsafe-use-jar/src/test/resources/jiras/surefire855/jar/properties/surefire855.properties deleted file mode 100644 index 690842d..0000000 --- a/surefire-integration-tests/src/test/resources/surefire-855-failsafe-use-jar/src/test/resources/jiras/surefire855/jar/properties/surefire855.properties +++ /dev/null @@ -1 +0,0 @@ -issue=SUREFIRE-855 http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/surefire-855-failsafe-use-war/pom.xml ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/surefire-855-failsafe-use-war/pom.xml b/surefire-integration-tests/src/test/resources/surefire-855-failsafe-use-war/pom.xml deleted file mode 100644 index 2d2cd5d..0000000 --- a/surefire-integration-tests/src/test/resources/surefire-855-failsafe-use-war/pom.xml +++ /dev/null @@ -1,124 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - ~ 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. - --> -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.apache.maven.surefire</groupId> - <artifactId>it-parent</artifactId> - <version>1.0</version> - <relativePath>../pom.xml</relativePath> - </parent> - <groupId>org.apache.maven.plugins.surefire</groupId> - <artifactId>jiras-surefire-855-war</artifactId> - <version>1.0</version> - <packaging>war</packaging> - <url>http://maven.apache.org</url> - <developers> - <developer> - <id>tibordigana</id> - <name>Tibor DigaÅa (tibor17)</name> - <email>tibordig...@apache.org</email> - <roles> - <role>Committer</role> - </roles> - <timezone>Europe/Bratislava</timezone> - </developer> - </developers> - <dependencies> - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>4.11</version> - <scope>test</scope> - </dependency> - <dependency> - <groupId>org.easytesting</groupId> - <artifactId>fest-assert-core</artifactId> - <version>2.0M9</version> - <scope>test</scope> - </dependency> - <dependency> - <groupId>org.hamcrest</groupId> - <artifactId>hamcrest-library</artifactId> - <version>1.3</version> - <scope>test</scope> - </dependency> - </dependencies> - <build> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-source-plugin</artifactId> - <version>2.3</version> - <executions> - <execution> - <id>attach-sources</id> - <goals> - <goal>jar-no-fork</goal> - </goals> - </execution> - </executions> - </plugin> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-javadoc-plugin</artifactId> - <version>3.0.0</version> - <executions> - <execution> - <id>attach-javadoc</id> - <goals> - <goal>jar</goal> - </goals> - </execution> - </executions> - </plugin> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-war-plugin</artifactId> - <version>2.4</version> - <configuration> - <failOnMissingWebXml>false</failOnMissingWebXml> - </configuration> - </plugin> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-failsafe-plugin</artifactId> - <executions> - <execution> - <id>integration-test</id> - <goals> - <goal>integration-test</goal> - </goals> - </execution> - <execution> - <id>verify</id> - <goals> - <goal>verify</goal> - </goals> - </execution> - </executions> - <configuration> - <forkMode>always</forkMode> - </configuration> - </plugin> - </plugins> - </build> -</project> http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/surefire-855-failsafe-use-war/src/main/java/pkg/ToCreateClassesDirectory.java ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/surefire-855-failsafe-use-war/src/main/java/pkg/ToCreateClassesDirectory.java b/surefire-integration-tests/src/test/resources/surefire-855-failsafe-use-war/src/main/java/pkg/ToCreateClassesDirectory.java deleted file mode 100644 index ffe6be9..0000000 --- a/surefire-integration-tests/src/test/resources/surefire-855-failsafe-use-war/src/main/java/pkg/ToCreateClassesDirectory.java +++ /dev/null @@ -1,24 +0,0 @@ -package pkg; - -/* - * 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. - */ - -public class ToCreateClassesDirectory -{ -} http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/surefire-855-failsafe-use-war/src/main/resources/main/surefire855.properties ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/surefire-855-failsafe-use-war/src/main/resources/main/surefire855.properties b/surefire-integration-tests/src/test/resources/surefire-855-failsafe-use-war/src/main/resources/main/surefire855.properties deleted file mode 100644 index 690842d..0000000 --- a/surefire-integration-tests/src/test/resources/surefire-855-failsafe-use-war/src/main/resources/main/surefire855.properties +++ /dev/null @@ -1 +0,0 @@ -issue=SUREFIRE-855 http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/surefire-855-failsafe-use-war/src/test/java/jiras/surefire855/war/FooIT.java ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/surefire-855-failsafe-use-war/src/test/java/jiras/surefire855/war/FooIT.java b/surefire-integration-tests/src/test/resources/surefire-855-failsafe-use-war/src/test/java/jiras/surefire855/war/FooIT.java deleted file mode 100644 index 95eb8c3..0000000 --- a/surefire-integration-tests/src/test/resources/surefire-855-failsafe-use-war/src/test/java/jiras/surefire855/war/FooIT.java +++ /dev/null @@ -1,163 +0,0 @@ -package jiras.surefire855.war; - -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -import org.junit.Test; - -import java.io.File; -import java.io.FileFilter; -import java.io.IOException; -import java.io.InputStream; -import java.io.StringReader; -import java.util.Properties; -import java.util.jar.JarFile; -import java.util.jar.Manifest; - -import static org.fest.assertions.api.Assertions.assertThat; -import static org.fest.assertions.api.Assertions.contentOf; -import static org.hamcrest.Matchers.*; -import static org.hamcrest.MatcherAssert.assertThat; - -public final class FooIT -{ - private static final String MAIN_RESOURCE = "/main/surefire855.properties"; - - private static final String TEST_RESOURCE = "/jiras/surefire855/war/properties/surefire855.properties"; - - private static File surefireDir() - throws IOException - { - String bootPath = System.getProperty( "surefire.real.class.path" ); - return bootPath == null ? null : new File( bootPath ).getParentFile(); - } - - private static File[] surefireProviderProperties() - throws IOException - { - return surefireDir().listFiles( new FileFilter() - { - public boolean accept( File pathname ) - { - try - { - return isSurefireProviderProperties( pathname ); - } - catch ( IOException e ) - { - return false; - } - } - } ); - } - - /** - * See BooterSerializer#serialize(). - */ - private static boolean isSurefireProviderProperties( File pathname ) - throws IOException - { - pathname = pathname.getCanonicalFile(); - String fileName = pathname.getName(); - return pathname.isFile() && fileName.startsWith( "surefire" ) && !fileName.startsWith( "surefire_" ) - && fileName.endsWith( "tmp" ); - } - - private static boolean isSurefireBooter( File pathname ) - throws IOException - { - pathname = pathname.getCanonicalFile(); - String fileName = pathname.getName(); - return pathname.isFile() && fileName.startsWith( "surefirebooter" ) && fileName.endsWith( ".jar" ); - } - - private static String manifestClassPath( Class clazz ) - throws IOException - { - File booter = new File( System.getProperty( "surefire.real.class.path" ) ); - assertThat( booter ).exists(); - assertThat( booter ).isFile(); - JarFile jarFile = new JarFile( booter ); - try - { - Manifest manifest = jarFile.getManifest(); - return manifest.getMainAttributes().getValue( "Class-Path" ); - } - finally - { - jarFile.close(); - } - } - - private static Properties loadProperties( Class clazz, String resourcePath ) - throws IOException - { - InputStream is = clazz.getResourceAsStream( resourcePath ); - Properties prop = new Properties(); - prop.load( is ); - is.close(); - return prop; - } - - private static Properties loadMainProperties( Class clazz ) - throws IOException - { - return loadProperties( clazz, MAIN_RESOURCE ); - } - - private static Properties loadTestProperties( Class clazz ) - throws IOException - { - return loadProperties( clazz, TEST_RESOURCE ); - } - - @Test - public void test() - throws IOException - { - String classPath = manifestClassPath( getClass() ); - System.out.println( "CLASS PATH:" ); - System.out.println( classPath ); - - assertThat( classPath, containsString( "/target/classes" ) ); - - File[] descriptors = surefireProviderProperties(); - assertThat( descriptors ).hasSize( 1 ); - assertThat( descriptors ).doesNotContainNull(); - assertThat( descriptors[0] ).isFile(); - - String surefireProperties = contentOf( descriptors[0] ); - Properties properties = new Properties(); - properties.load( new StringReader( surefireProperties ) ); - System.out.println( properties.toString() ); - File actualArtifact = new File( properties.getProperty( "classPathUrl.1" ) ).getCanonicalFile(); - File expectedArtifact = new File( "target/classes" ).getCanonicalFile(); - assertThat( actualArtifact ).isDirectory(); - assertThat( expectedArtifact ).isDirectory(); - assertThat( actualArtifact ).isEqualTo( expectedArtifact ); - } - - @Test - public void shouldAlwaysHaveResources() - throws IOException - { - assertThat( loadTestProperties( getClass() ).getProperty( "issue" ), is( "SUREFIRE-855" ) ); - assertThat( loadMainProperties( getClass() ).getProperty( "issue" ), is( "SUREFIRE-855" ) ); - } -} http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/surefire-855-failsafe-use-war/src/test/resources/jiras/surefire855/war/properties/surefire855.properties ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/surefire-855-failsafe-use-war/src/test/resources/jiras/surefire855/war/properties/surefire855.properties b/surefire-integration-tests/src/test/resources/surefire-855-failsafe-use-war/src/test/resources/jiras/surefire855/war/properties/surefire855.properties deleted file mode 100644 index 690842d..0000000 --- a/surefire-integration-tests/src/test/resources/surefire-855-failsafe-use-war/src/test/resources/jiras/surefire855/war/properties/surefire855.properties +++ /dev/null @@ -1 +0,0 @@ -issue=SUREFIRE-855 http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/surefire-926-2-provider-failure/pom.xml ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/surefire-926-2-provider-failure/pom.xml b/surefire-integration-tests/src/test/resources/surefire-926-2-provider-failure/pom.xml deleted file mode 100644 index ecafe11..0000000 --- a/surefire-integration-tests/src/test/resources/surefire-926-2-provider-failure/pom.xml +++ /dev/null @@ -1,41 +0,0 @@ -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - <modelVersion>4.0.0</modelVersion> - <groupId>groupId</groupId> - <artifactId>artifactId</artifactId> - <version>1.0-SNAPSHOT</version> - <build> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-surefire-plugin</artifactId> - <version>${surefire.version}</version> - <dependencies> - <dependency> - <groupId>org.apache.maven.surefire</groupId> - <artifactId>surefire-testng</artifactId> - <version>${surefire.version}</version> - </dependency> - <dependency> - <groupId>org.apache.maven.surefire</groupId> - <artifactId>surefire-junit47</artifactId> - <version>${surefire.version}</version> - </dependency> - </dependencies> - </plugin> - </plugins> - </build> - <dependencies> - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>4.10</version> - <scope>test</scope> - </dependency> - <dependency> - <groupId>org.testng</groupId> - <artifactId>testng</artifactId> - <version>6.8</version> - <scope>test</scope> - </dependency> - </dependencies> -</project> http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/surefire-926-2-provider-failure/src/test/java/com/company/JUnitTest.java ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/surefire-926-2-provider-failure/src/test/java/com/company/JUnitTest.java b/surefire-integration-tests/src/test/resources/surefire-926-2-provider-failure/src/test/java/com/company/JUnitTest.java deleted file mode 100644 index 39639cf..0000000 --- a/surefire-integration-tests/src/test/resources/surefire-926-2-provider-failure/src/test/java/com/company/JUnitTest.java +++ /dev/null @@ -1,31 +0,0 @@ -package com.company; - -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -import org.junit.Assert; -import org.junit.Test; - -public class JUnitTest { - @Test - public void test() { - //Assert.assertTrue(true); - Assert.assertTrue(false); - } -} http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/surefire-926-2-provider-failure/src/test/java/com/company/TestNGTest.java ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/surefire-926-2-provider-failure/src/test/java/com/company/TestNGTest.java b/surefire-integration-tests/src/test/resources/surefire-926-2-provider-failure/src/test/java/com/company/TestNGTest.java deleted file mode 100644 index 2701cb2..0000000 --- a/surefire-integration-tests/src/test/resources/surefire-926-2-provider-failure/src/test/java/com/company/TestNGTest.java +++ /dev/null @@ -1,31 +0,0 @@ -package com.company; - -/* - * 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.testng.Assert; -import org.testng.annotations.Test; - -public class TestNGTest { - @Test - public void test() { - Assert.assertTrue(true); - //Assert.assertTrue(false); - } -} http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/surefire-930-failsafe-runtests/pom.xml ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/surefire-930-failsafe-runtests/pom.xml b/surefire-integration-tests/src/test/resources/surefire-930-failsafe-runtests/pom.xml deleted file mode 100644 index 8535068..0000000 --- a/surefire-integration-tests/src/test/resources/surefire-930-failsafe-runtests/pom.xml +++ /dev/null @@ -1,53 +0,0 @@ -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - <modelVersion>4.0.0</modelVersion> - - <groupId>org.apache.maven.plugins</groupId> - <artifactId>failsafe-test</artifactId> - <version>1.0.0-SNAPSHOT</version> - - <name>FailSafe Test</name> - <description>surefire-930</description> - - <properties> - <surefire.version>2.12.4</surefire.version> - <maven.compiler.source>1.7</maven.compiler.source> - <maven.compiler.target>1.7</maven.compiler.target> - </properties> - <dependencies> - <dependency> - <groupId>org.testng</groupId> - <artifactId>testng</artifactId> - <version>6.8</version> - <scope>test</scope> - </dependency> - </dependencies> - - <build> - <plugins> - <plugin> - <artifactId>maven-surefire-plugin</artifactId> - <configuration> - <skip>true</skip> - </configuration> - </plugin> - <plugin> - <artifactId>maven-failsafe-plugin</artifactId> - <version>${surefire.version}</version> - <configuration> - <suiteXmlFiles> - <suiteXmlFile>${project.basedir}/src/test/resources/testng-integrationTest.xml</suiteXmlFile> - </suiteXmlFiles> - </configuration> - <executions> - <execution> - <goals> - <goal>integration-test</goal> - <goal>verify</goal> - </goals> - </execution> - </executions> - </plugin> - </plugins> - </build> -</project> http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/surefire-930-failsafe-runtests/src/test/java/org/apache/maven/plugins/failsafe/ExampleIntegrationTest.java ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/surefire-930-failsafe-runtests/src/test/java/org/apache/maven/plugins/failsafe/ExampleIntegrationTest.java b/surefire-integration-tests/src/test/resources/surefire-930-failsafe-runtests/src/test/java/org/apache/maven/plugins/failsafe/ExampleIntegrationTest.java deleted file mode 100644 index 3ddc90c..0000000 --- a/surefire-integration-tests/src/test/resources/surefire-930-failsafe-runtests/src/test/java/org/apache/maven/plugins/failsafe/ExampleIntegrationTest.java +++ /dev/null @@ -1,32 +0,0 @@ -package org.apache.maven.plugins.failsafe; - -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -import org.junit.Assert; -import org.testng.annotations.Test; - -@Test(groups = { TestConstants.IntegrationTest }) -public class ExampleIntegrationTest { - - public void shouldRun() { - System.out.println("Hello from Integration-Test"); - Assert.fail("this will not be executed"); - } -} http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/surefire-930-failsafe-runtests/src/test/java/org/apache/maven/plugins/failsafe/ExampleTest.java ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/surefire-930-failsafe-runtests/src/test/java/org/apache/maven/plugins/failsafe/ExampleTest.java b/surefire-integration-tests/src/test/resources/surefire-930-failsafe-runtests/src/test/java/org/apache/maven/plugins/failsafe/ExampleTest.java deleted file mode 100644 index 19a08d5..0000000 --- a/surefire-integration-tests/src/test/resources/surefire-930-failsafe-runtests/src/test/java/org/apache/maven/plugins/failsafe/ExampleTest.java +++ /dev/null @@ -1,32 +0,0 @@ -package org.apache.maven.plugins.failsafe; - -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -import org.junit.Assert; -import org.testng.annotations.Test; - -@Test(groups = { TestConstants.UnitTest }) -public class ExampleTest { - - public void shouldRun() { - System.out.println("Hello from Unit-Test"); - Assert.assertTrue(true); - } -} http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/surefire-930-failsafe-runtests/src/test/java/org/apache/maven/plugins/failsafe/TestConstants.java ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/surefire-930-failsafe-runtests/src/test/java/org/apache/maven/plugins/failsafe/TestConstants.java b/surefire-integration-tests/src/test/resources/surefire-930-failsafe-runtests/src/test/java/org/apache/maven/plugins/failsafe/TestConstants.java deleted file mode 100644 index 5fb74e2..0000000 --- a/surefire-integration-tests/src/test/resources/surefire-930-failsafe-runtests/src/test/java/org/apache/maven/plugins/failsafe/TestConstants.java +++ /dev/null @@ -1,33 +0,0 @@ -package org.apache.maven.plugins.failsafe; - -/* - * 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. - */ - -/** - * Constants for testing - * - * @author mspika - */ -public final class TestConstants { - - public static final String UnitTest = "Unit-Test"; - public static final String IntegrationTest = "Integration-Test"; - public static final String ManualTest = "Manual-Test"; - public static final String BrokenTest = "Broken-Test"; -} http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/surefire-930-failsafe-runtests/src/test/resources/testng-integrationTest.xml ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/surefire-930-failsafe-runtests/src/test/resources/testng-integrationTest.xml b/surefire-integration-tests/src/test/resources/surefire-930-failsafe-runtests/src/test/resources/testng-integrationTest.xml deleted file mode 100644 index 5db8b24..0000000 --- a/surefire-integration-tests/src/test/resources/surefire-930-failsafe-runtests/src/test/resources/testng-integrationTest.xml +++ /dev/null @@ -1,18 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd" > -<suite name="TNSIntegrationSuite" verbose="1"> - <test name="TNS-Integration"> - <groups> - <run> - <include name="Integration-Test" /> - <exclude name="Unit-Test" /> - <exclude name="Broken-Test" /> - <exclude name="Manual-Test" /> - </run> - </groups> - - <packages> - <package name="org.apache.maven.plugins.failsafe.*" /> - </packages> - </test> -</suite> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/surefire-930-failsafe-runtests/src/test/resources/testng.xml ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/surefire-930-failsafe-runtests/src/test/resources/testng.xml b/surefire-integration-tests/src/test/resources/surefire-930-failsafe-runtests/src/test/resources/testng.xml deleted file mode 100644 index a9b8733..0000000 --- a/surefire-integration-tests/src/test/resources/surefire-930-failsafe-runtests/src/test/resources/testng.xml +++ /dev/null @@ -1,17 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd" > -<suite name="TNSIntegrationSuite" verbose="1"> - <test name="TNS"> - <groups> - <run> - <exclude name="Integration-Test" /> - <exclude name="Broken-Test" /> - <exclude name="Manual-Test" /> - </run> - </groups> - - <packages> - <package name="org.apache.maven.plugins.failsafe.*" /> - </packages> - </test> -</suite> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/surefire-931-provider-failure/pom.xml ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/surefire-931-provider-failure/pom.xml b/surefire-integration-tests/src/test/resources/surefire-931-provider-failure/pom.xml deleted file mode 100644 index 6232149..0000000 --- a/surefire-integration-tests/src/test/resources/surefire-931-provider-failure/pom.xml +++ /dev/null @@ -1,41 +0,0 @@ -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - <modelVersion>4.0.0</modelVersion> - - <groupId>com.mycompany</groupId> - <artifactId>TestFailed</artifactId> - <version>1.0-SNAPSHOT</version> - <packaging>jar</packaging> - - <name>TestFailed</name> - <url>http://maven.apache.org</url> - - <properties> - <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> - <maven.compiler.source>1.7</maven.compiler.source> - <maven.compiler.target>1.7</maven.compiler.target> - </properties> - <build> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-surefire-plugin</artifactId> - <version>${surefire.version}</version> - </plugin> - </plugins> - </build> - - <dependencies> - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>3.8.1</version> - <scope>test</scope> - </dependency> - <dependency> - <groupId>org.testng</groupId> - <artifactId>testng</artifactId> - <version>6.8</version> - </dependency> - </dependencies> -</project> http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/surefire-931-provider-failure/src/main/java/com/mycompany/testfailed/App.java ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/surefire-931-provider-failure/src/main/java/com/mycompany/testfailed/App.java b/surefire-integration-tests/src/test/resources/surefire-931-provider-failure/src/main/java/com/mycompany/testfailed/App.java deleted file mode 100644 index 9a1c710..0000000 --- a/surefire-integration-tests/src/test/resources/surefire-931-provider-failure/src/main/java/com/mycompany/testfailed/App.java +++ /dev/null @@ -1,32 +0,0 @@ -package com.mycompany.testfailed; - -/* - * 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. - */ - -/** - * Hello world! - * - */ -public class App -{ - public static void main( String[] args ) - { - System.out.println( "Hello World!" ); - } -} http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/surefire-931-provider-failure/src/test/java/com/mycompany/testfailed/AppTest.java ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/surefire-931-provider-failure/src/test/java/com/mycompany/testfailed/AppTest.java b/surefire-integration-tests/src/test/resources/surefire-931-provider-failure/src/test/java/com/mycompany/testfailed/AppTest.java deleted file mode 100644 index e760b87..0000000 --- a/surefire-integration-tests/src/test/resources/surefire-931-provider-failure/src/test/java/com/mycompany/testfailed/AppTest.java +++ /dev/null @@ -1,37 +0,0 @@ -package com.mycompany.testfailed; - -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -import junit.framework.TestCase; -import org.testng.annotations.Test; - - -/** - * Unit test for simple App. - */ -public class AppTest - extends TestCase -{ - @Test(groups = "deleteLocation", dependsOnGroups = - { - "postLocation", "getLocation" - }) - public void removeNonExistentLocation() {} -} http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/surefire-942-testngSuite/pom.xml ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/surefire-942-testngSuite/pom.xml b/surefire-integration-tests/src/test/resources/surefire-942-testngSuite/pom.xml deleted file mode 100644 index 2a0fac5..0000000 --- a/surefire-integration-tests/src/test/resources/surefire-942-testngSuite/pom.xml +++ /dev/null @@ -1,37 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<project xmlns="http://maven.apache.org/POM/4.0.0" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - <modelVersion>4.0.0</modelVersion> - - <groupId>surefire-testng</groupId> - <artifactId>surefire-testng</artifactId> - <version>1.0-SNAPSHOT</version> - - <properties> - <surefire.version>2.12.4</surefire.version> - </properties> - - <dependencies> - <dependency> - <groupId>org.testng</groupId> - <artifactId>testng</artifactId> - <version>5.14</version> - <scope>test</scope> - </dependency> - </dependencies> - - <build> - <plugins> - <plugin> - <artifactId>maven-surefire-plugin</artifactId> - <version>${surefire.version}</version> - <configuration> - <suiteXmlFiles> - <suiteXmlFile>src/test/resources/config.xml</suiteXmlFile> - </suiteXmlFiles> - </configuration> - </plugin> - </plugins> - </build> -</project> http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/surefire-942-testngSuite/src/test/java/org/BasicTest.java ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/surefire-942-testngSuite/src/test/java/org/BasicTest.java b/surefire-integration-tests/src/test/resources/surefire-942-testngSuite/src/test/java/org/BasicTest.java deleted file mode 100644 index be0bea0..0000000 --- a/surefire-integration-tests/src/test/resources/surefire-942-testngSuite/src/test/java/org/BasicTest.java +++ /dev/null @@ -1,67 +0,0 @@ -package org; - -/* - * 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.testng.annotations.*; -import org.testng.Assert; - -public class BasicTest -{ - - private boolean setUpCalled = false; - - - @BeforeTest - public void setUp() - { - setUpCalled = true; - } - - @AfterTest - public void tearDown() - { - setUpCalled = false; - } - - @Test - public void testSetUp() - { - Assert.assertTrue( setUpCalled ); - } - - @Test - public void testSuccessOne() - { - Assert.assertTrue( true ); - } - - @Test - public void testSuccessTwo() - { - Assert.assertTrue( true ); - } - - @AfterClass - public static void oneTimeTearDown() - { - - } - -} http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/surefire-942-testngSuite/src/test/resources/config.xml ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/surefire-942-testngSuite/src/test/resources/config.xml b/surefire-integration-tests/src/test/resources/surefire-942-testngSuite/src/test/resources/config.xml deleted file mode 100644 index a92872b..0000000 --- a/surefire-integration-tests/src/test/resources/surefire-942-testngSuite/src/test/resources/config.xml +++ /dev/null @@ -1,8 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<suite name="tests" verbose="0"> - <test name="tests"> - <packages> - <package name="org.*"/> - </packages> - </test> -</suite> http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/surefire-943-report-content/pom.xml ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/surefire-943-report-content/pom.xml b/surefire-integration-tests/src/test/resources/surefire-943-report-content/pom.xml deleted file mode 100644 index 3b2958f..0000000 --- a/surefire-integration-tests/src/test/resources/surefire-943-report-content/pom.xml +++ /dev/null @@ -1,44 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - <modelVersion>4.0.0</modelVersion> - - <groupId>dummy</groupId> - <version>1.0-SNAPSHOT</version> - <artifactId>dummy</artifactId> - <name>surefire-943-report-content</name> - - <properties> - <surefire.version>2.13</surefire.version> - <maven.compiler.source>1.7</maven.compiler.source> - <maven.compiler.target>1.7</maven.compiler.target> - </properties> - - <build> - <pluginManagement> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-surefire-plugin</artifactId> - <version>${surefire.version}</version> - <dependencies> - <dependency> - <groupId>org.apache.maven.surefire</groupId> - <artifactId>surefire-junit47</artifactId> - <version>${surefire.version}</version> - </dependency> - </dependencies> - </plugin> - </plugins> - </pluginManagement> - </build> - - <dependencies> - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <scope>test</scope> - <version>4.11</version> - </dependency> - </dependencies> -</project> http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/surefire-943-report-content/src/test/java/org/sample/module/My1Test.java ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/surefire-943-report-content/src/test/java/org/sample/module/My1Test.java b/surefire-integration-tests/src/test/resources/surefire-943-report-content/src/test/java/org/sample/module/My1Test.java deleted file mode 100644 index 6512a3a..0000000 --- a/surefire-integration-tests/src/test/resources/surefire-943-report-content/src/test/java/org/sample/module/My1Test.java +++ /dev/null @@ -1,50 +0,0 @@ -package org.sample.module; - -/* - * 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 static org.junit.Assert.fail; - -import org.junit.Test; -import org.junit.Ignore; - -public class My1Test -{ - @Test - public void fails() - throws Exception - { - Thread.sleep( 1000 ); - fail( "Always fails" ); - } - - @Test - public void alwaysSuccessful() - throws Exception - { - Thread.sleep( 1000 ); - } - - @Test - @Ignore( "Ignore-Message" ) - public void alwaysIgnored() - { - - } -} http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/surefire-943-report-content/src/test/java/org/sample/module/My2Test.java ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/surefire-943-report-content/src/test/java/org/sample/module/My2Test.java b/surefire-integration-tests/src/test/resources/surefire-943-report-content/src/test/java/org/sample/module/My2Test.java deleted file mode 100644 index faea716..0000000 --- a/surefire-integration-tests/src/test/resources/surefire-943-report-content/src/test/java/org/sample/module/My2Test.java +++ /dev/null @@ -1,49 +0,0 @@ -package org.sample.module; - -/* - * 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 static org.junit.Assert.fail; - -import org.junit.Test; -import org.junit.Ignore; - -public class My2Test { - @Test - public void fails() - throws Exception - { - Thread.sleep( 1000 ); - fail( "Always fails" ); - } - - @Test - public void alwaysSuccessful() - throws Exception - { - Thread.sleep( 1000 ); - } - - @Test - @Ignore - public void alwaysIgnored() - { - - } -} http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/surefire-943-report-content/src/test/java/org/sample/module/My3Test.java ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/surefire-943-report-content/src/test/java/org/sample/module/My3Test.java b/surefire-integration-tests/src/test/resources/surefire-943-report-content/src/test/java/org/sample/module/My3Test.java deleted file mode 100644 index 2d35a99..0000000 --- a/surefire-integration-tests/src/test/resources/surefire-943-report-content/src/test/java/org/sample/module/My3Test.java +++ /dev/null @@ -1,41 +0,0 @@ -package org.sample.module; - -/* - * 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 static org.junit.Assert.fail; - -import org.junit.Test; - -public class My3Test { - @Test - public void fails() - throws Exception - { - Thread.sleep( 1000 ); - fail( "Always fails" ); - } - - @Test - public void alwaysSuccessful() - throws Exception - { - Thread.sleep( 1000 ); - } -} http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/surefire-943-report-content/src/test/java/org/sample/module/My4Test.java ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/surefire-943-report-content/src/test/java/org/sample/module/My4Test.java b/surefire-integration-tests/src/test/resources/surefire-943-report-content/src/test/java/org/sample/module/My4Test.java deleted file mode 100644 index c500c1e..0000000 --- a/surefire-integration-tests/src/test/resources/surefire-943-report-content/src/test/java/org/sample/module/My4Test.java +++ /dev/null @@ -1,41 +0,0 @@ -package org.sample.module; - -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -import org.junit.Test; -import org.junit.Ignore; - -@Ignore( "Ignore-Message" ) -public class My4Test -{ - - @Test - public void alsoIgnored() - { - - } - - @Test - @Ignore - public void alwaysIgnored() - { - - } -} http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/surefire-943-report-content/src/test/java/org/sample/module/My5Test.java ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/surefire-943-report-content/src/test/java/org/sample/module/My5Test.java b/surefire-integration-tests/src/test/resources/surefire-943-report-content/src/test/java/org/sample/module/My5Test.java deleted file mode 100644 index 1e30741..0000000 --- a/surefire-integration-tests/src/test/resources/surefire-943-report-content/src/test/java/org/sample/module/My5Test.java +++ /dev/null @@ -1,39 +0,0 @@ -package org.sample.module; - -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -import org.junit.BeforeClass; -import org.junit.Test; - -public class My5Test { - - @BeforeClass - public static void failsOnBeforeClass() - { - throw new RuntimeException("always fails before class"); - } - - @Test - public void neverExecuted() - throws Exception - { - - } -}