http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/fork-mode-resource-loading/pom.xml ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/fork-mode-resource-loading/pom.xml b/surefire-integration-tests/src/test/resources/fork-mode-resource-loading/pom.xml deleted file mode 100644 index e40033c..0000000 --- a/surefire-integration-tests/src/test/resources/fork-mode-resource-loading/pom.xml +++ /dev/null @@ -1,54 +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.apache.maven.plugins.surefire</groupId> - <artifactId>fork-mode-resource-loading</artifactId> - <version>1.0-SNAPSHOT</version> - <name>Test for forkMode</name> - - <properties> - <maven.compiler.source>1.7</maven.compiler.source> - <maven.compiler.target>1.7</maven.compiler.target> - </properties> - - <build> - <plugins> - <plugin> - <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> - </dependencies> - -</project>
http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/fork-mode-resource-loading/src/test/java/forkMode/ResourceLoadTest.java ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/fork-mode-resource-loading/src/test/java/forkMode/ResourceLoadTest.java b/surefire-integration-tests/src/test/resources/fork-mode-resource-loading/src/test/java/forkMode/ResourceLoadTest.java deleted file mode 100644 index e2c3d51..0000000 --- a/surefire-integration-tests/src/test/resources/fork-mode-resource-loading/src/test/java/forkMode/ResourceLoadTest.java +++ /dev/null @@ -1,46 +0,0 @@ -package forkMode; - -/* - * 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 java.io.IOException; -import java.io.InputStream; -import java.net.URL; - -public class ResourceLoadTest - extends TestCase -{ - - public void testGetResourceUrl() throws IOException { - final URL resource = this.getClass().getClassLoader().getResource( "myFile.txt" ); - assertNotNull( resource ); - } - - public void testGetResource() throws IOException { - final InputStream resource = this.getClass().getClassLoader().getResourceAsStream( "myFile.txt" ); - assertNotNull( resource ); - } - - public void testGetResourceThreadLoader() throws IOException { - final InputStream resource = Thread.currentThread().getContextClassLoader().getResourceAsStream( "myFile.txt" ); - assertNotNull( resource ); - } -} http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/fork-mode-resource-loading/src/test/resources/myFile.txt ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/fork-mode-resource-loading/src/test/resources/myFile.txt b/surefire-integration-tests/src/test/resources/fork-mode-resource-loading/src/test/resources/myFile.txt deleted file mode 100644 index 51f466f..0000000 --- a/surefire-integration-tests/src/test/resources/fork-mode-resource-loading/src/test/resources/myFile.txt +++ /dev/null @@ -1 +0,0 @@ -A file http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/fork-mode-testng/pom.xml ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/fork-mode-testng/pom.xml b/surefire-integration-tests/src/test/resources/fork-mode-testng/pom.xml deleted file mode 100644 index 8e25749..0000000 --- a/surefire-integration-tests/src/test/resources/fork-mode-testng/pom.xml +++ /dev/null @@ -1,50 +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.apache.maven.plugins.surefire</groupId> - <artifactId>fork-mode-testng</artifactId> - <version>1.0-SNAPSHOT</version> - <name>Test for forkMode</name> - - <properties> - <maven.compiler.source>1.7</maven.compiler.source> - <maven.compiler.target>1.7</maven.compiler.target> - </properties> - - <build> - <plugins> - <plugin> - <artifactId>maven-surefire-plugin</artifactId> - <version>${surefire.version}</version> - <configuration> - <forkMode>${forkMode}</forkMode> - <threadCount>${threadCount}</threadCount> - </configuration> - </plugin> - </plugins> - </build> - - <dependencies> - <dependency> - <groupId>org.testng</groupId> - <artifactId>testng</artifactId> - <version>5.7</version> - <classifier>jdk15</classifier> - <scope>test</scope> - <exclusions> - <exclusion> - <!-- NOTE: Deliberately excluding junit to enforce TestNG only tests, cf. SUREFIRE-642 --> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - </exclusion> - </exclusions> - </dependency> - </dependencies> - -</project> http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/fork-mode-testng/src/test/java/forkMode/Test1.java ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/fork-mode-testng/src/test/java/forkMode/Test1.java b/surefire-integration-tests/src/test/resources/fork-mode-testng/src/test/java/forkMode/Test1.java deleted file mode 100644 index 8caec4e..0000000 --- a/surefire-integration-tests/src/test/resources/fork-mode-testng/src/test/java/forkMode/Test1.java +++ /dev/null @@ -1,65 +0,0 @@ -package forkMode; - -/* - * 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 java.io.FileWriter; -import java.io.IOException; -import java.lang.management.ManagementFactory; -import java.util.Random; - -import org.testng.annotations.Test; - -public class Test1 -{ - - private static final Random RANDOM = new Random(); - - @Test - public void test1() - throws IOException, InterruptedException - { - int sleepLength = Integer.valueOf( System.getProperty( "sleepLength", "750" )); - Thread.sleep(sleepLength); - dumpPidFile( "test1" ); - } - - public static void dumpPidFile( String name ) - throws IOException - { - String fileName = name + "-pid"; - File target = new File( "target" ).getCanonicalFile(); - if ( !( target.exists() && target.isDirectory() ) ) - { - target = new File( "." ); - } - File pidFile = new File( target, fileName ); - FileWriter fw = new FileWriter( pidFile ); - // DGF little known trick... this is guaranteed to be unique to the PID - // In fact, it usually contains the pid and the local host name! - String pid = ManagementFactory.getRuntimeMXBean().getName(); - fw.write( pid ); - fw.write( " " ); - fw.write( System.getProperty( "testProperty", String.valueOf( RANDOM.nextLong() ) ) ); - fw.flush(); - fw.close(); - } - -} http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/fork-mode-testng/src/test/java/forkMode/Test2.java ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/fork-mode-testng/src/test/java/forkMode/Test2.java b/surefire-integration-tests/src/test/resources/fork-mode-testng/src/test/java/forkMode/Test2.java deleted file mode 100644 index d7e8be9..0000000 --- a/surefire-integration-tests/src/test/resources/fork-mode-testng/src/test/java/forkMode/Test2.java +++ /dev/null @@ -1,33 +0,0 @@ -package forkMode; - -/* - * 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 org.testng.annotations.Test; - -public class Test2 -{ - @Test - public void test2() throws IOException { - Test1.dumpPidFile( "test2" ); - } - -} http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/fork-mode-testng/src/test/java/forkMode/Test3.java ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/fork-mode-testng/src/test/java/forkMode/Test3.java b/surefire-integration-tests/src/test/resources/fork-mode-testng/src/test/java/forkMode/Test3.java deleted file mode 100644 index e52f2b7..0000000 --- a/surefire-integration-tests/src/test/resources/fork-mode-testng/src/test/java/forkMode/Test3.java +++ /dev/null @@ -1,34 +0,0 @@ -package forkMode; - -/* - * 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 org.testng.annotations.Test; - -public class Test3 -{ - - @Test - public void test3() throws IOException { - Test1.dumpPidFile( "test3" ); - } - -} http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/fork-mode/pom.xml ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/fork-mode/pom.xml b/surefire-integration-tests/src/test/resources/fork-mode/pom.xml deleted file mode 100644 index 28bfb4d..0000000 --- a/surefire-integration-tests/src/test/resources/fork-mode/pom.xml +++ /dev/null @@ -1,59 +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.apache.maven.plugins.surefire</groupId> - <artifactId>fork-mode</artifactId> - <version>1.0-SNAPSHOT</version> - <name>Test for forkMode</name> - - <properties> - <maven.compiler.source>1.7</maven.compiler.source> - <maven.compiler.target>1.7</maven.compiler.target> - </properties> - - <build> - <plugins> - <plugin> - <artifactId>maven-surefire-plugin</artifactId> - <version>${surefire.version}</version> - <configuration> - <forkMode>${forkMode}</forkMode> - <threadCount>${threadCount}</threadCount> - <runOrder>alphabetical</runOrder> - </configuration> - </plugin> - </plugins> - </build> - - <dependencies> - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>3.8.1</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/fork-mode/src/test/java/forkMode/Test1.java ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/fork-mode/src/test/java/forkMode/Test1.java b/surefire-integration-tests/src/test/resources/fork-mode/src/test/java/forkMode/Test1.java deleted file mode 100644 index 980123c..0000000 --- a/surefire-integration-tests/src/test/resources/fork-mode/src/test/java/forkMode/Test1.java +++ /dev/null @@ -1,67 +0,0 @@ -package forkMode; - -/* - * 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 java.io.FileWriter; -import java.io.IOException; -import java.lang.management.ManagementFactory; -import java.util.Random; - -import junit.framework.TestCase; - -public class Test1 - extends TestCase -{ - - private static final Random RANDOM = new Random(); - - public void test1() - throws IOException, InterruptedException - { - int sleepLength = Integer.valueOf( System.getProperty( "sleepLength", "750" )); - Thread.sleep(sleepLength); - dumpPidFile( this ); - } - - public static void dumpPidFile( TestCase test ) - throws IOException - { - String fileName = test.getName() + "-pid"; - File target = new File( "target" ).getCanonicalFile(); // getCanonicalFile required for embedded mode - if ( !( target.exists() && target.isDirectory() ) ) - { - target = new File( "." ); - } - File pidFile = new File( target, fileName ); - FileWriter fw = new FileWriter( pidFile ); - // DGF little known trick... this is guaranteed to be unique to the PID - // In fact, it usually contains the pid and the local host name! - String pid = ManagementFactory.getRuntimeMXBean().getName(); - fw.write( pid ); - fw.write( " " ); - fw.write( System.getProperty( "testProperty", String.valueOf( RANDOM.nextLong() ) ) ); - fw.flush(); - fw.close(); - System.out.println( "Done Writing pid file" + pidFile.getAbsolutePath() ); - } - - -} http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/fork-mode/src/test/java/forkMode/Test2.java ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/fork-mode/src/test/java/forkMode/Test2.java b/surefire-integration-tests/src/test/resources/fork-mode/src/test/java/forkMode/Test2.java deleted file mode 100644 index 33d3cf1..0000000 --- a/surefire-integration-tests/src/test/resources/fork-mode/src/test/java/forkMode/Test2.java +++ /dev/null @@ -1,34 +0,0 @@ -package forkMode; - -/* - * 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 junit.framework.TestCase; - -public class Test2 - extends TestCase -{ - - public void test2() throws IOException { - Test1.dumpPidFile(this); - } - -} http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/fork-mode/src/test/java/forkMode/Test3.java ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/fork-mode/src/test/java/forkMode/Test3.java b/surefire-integration-tests/src/test/resources/fork-mode/src/test/java/forkMode/Test3.java deleted file mode 100644 index c8eef74..0000000 --- a/surefire-integration-tests/src/test/resources/fork-mode/src/test/java/forkMode/Test3.java +++ /dev/null @@ -1,34 +0,0 @@ -package forkMode; - -/* - * 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 junit.framework.TestCase; - -public class Test3 - extends TestCase -{ - - public void test3() throws IOException { - Test1.dumpPidFile(this); - } - -} http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/fork-timeout/pom.xml ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/fork-timeout/pom.xml b/surefire-integration-tests/src/test/resources/fork-timeout/pom.xml deleted file mode 100644 index 25365a2..0000000 --- a/surefire-integration-tests/src/test/resources/fork-timeout/pom.xml +++ /dev/null @@ -1,47 +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.surefire</groupId> - <artifactId>fork-timeout-test</artifactId> - <packaging>jar</packaging> - <version>1.0-SNAPSHOT</version> - <name>fork-timeout</name> - <url>http://maven.apache.org</url> - <properties> - <junit.version>4.8.1</junit.version> - <junit.parallel>classes</junit.parallel> - <forkMode>once</forkMode> - <timeOut>1</timeOut> - <maven.compiler.source>1.7</maven.compiler.source> - <maven.compiler.target>1.7</maven.compiler.target> - </properties> - <dependencies> - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>${junit.version}</version> - </dependency> - </dependencies> - <build> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-surefire-plugin</artifactId> - <version>${surefire.version}</version> - <configuration> - <forkMode>${forkMode}</forkMode> - <parallel>${junit.parallel}</parallel> - <threadCount>3</threadCount> - <perCoreThreadCount>false</perCoreThreadCount> - <redirectTestOutputToFile>true</redirectTestOutputToFile> - <forkedProcessTimeoutInSeconds>${timeOut}</forkedProcessTimeoutInSeconds> - <reportFormat>plain</reportFormat> - <useFile>true</useFile> - <includes> - <include>**/Test*.java</include> - </includes> - </configuration> - </plugin> - </plugins> - </build> -</project> http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/fork-timeout/src/test/java/forktimeout/BaseForkTimeout.java ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/fork-timeout/src/test/java/forktimeout/BaseForkTimeout.java b/surefire-integration-tests/src/test/resources/fork-timeout/src/test/java/forktimeout/BaseForkTimeout.java deleted file mode 100644 index a2dc6cb..0000000 --- a/surefire-integration-tests/src/test/resources/fork-timeout/src/test/java/forktimeout/BaseForkTimeout.java +++ /dev/null @@ -1,53 +0,0 @@ -package forktimeout; - -/* - * 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 abstract class BaseForkTimeout -{ - protected void dumpStuff( String prefix ) - { - reallySleep( 990 ); - for ( int i = 0; i < 200; i++ ) - { - System.out.println( prefix + " with lots of output " + i ); - System.err.println( prefix + "e with lots of output " + i ); - } - System.out.println( prefix + "last line" ); - System.err.println( prefix + "e last line" ); - } - - private void reallySleep( long timeout ) - { - long endAt = System.currentTimeMillis() + timeout; - try - { - Thread.sleep( timeout ); - while ( System.currentTimeMillis() < endAt ) - { - Thread.yield(); - Thread.sleep( 5 ); - } - } - catch ( InterruptedException e ) - { - throw new RuntimeException( e ); - } - } -} http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/fork-timeout/src/test/java/forktimeout/Test1.java ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/fork-timeout/src/test/java/forktimeout/Test1.java b/surefire-integration-tests/src/test/resources/fork-timeout/src/test/java/forktimeout/Test1.java deleted file mode 100644 index d176fce..0000000 --- a/surefire-integration-tests/src/test/resources/fork-timeout/src/test/java/forktimeout/Test1.java +++ /dev/null @@ -1,34 +0,0 @@ -package forktimeout; - -/* - * 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; - -public class Test1 - extends BaseForkTimeout -{ - @Test - public void test690() - { - dumpStuff( "test690" ); - System.out.println( " with lots of output " ); - System.err.println( "e with lots of output " ); - } -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/fork-timeout/src/test/java/forktimeout/Test2.java ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/fork-timeout/src/test/java/forktimeout/Test2.java b/surefire-integration-tests/src/test/resources/fork-timeout/src/test/java/forktimeout/Test2.java deleted file mode 100644 index 25b0ecd..0000000 --- a/surefire-integration-tests/src/test/resources/fork-timeout/src/test/java/forktimeout/Test2.java +++ /dev/null @@ -1,30 +0,0 @@ -package forktimeout; -/* - * 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; - -public class Test2 extends BaseForkTimeout -{ - @Test - public void test690_2() { - dumpStuff( "test690_2" ); - } -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/fork-timeout/src/test/java/forktimeout/Test3.java ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/fork-timeout/src/test/java/forktimeout/Test3.java b/surefire-integration-tests/src/test/resources/fork-timeout/src/test/java/forktimeout/Test3.java deleted file mode 100644 index b618bdb..0000000 --- a/surefire-integration-tests/src/test/resources/fork-timeout/src/test/java/forktimeout/Test3.java +++ /dev/null @@ -1,32 +0,0 @@ -package forktimeout; -/* - * 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; - -public class Test3 extends BaseForkTimeout -{ - - @Test - public void test690_3() { - dumpStuff( "test690_3" ); - } - -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/fork-timeout/src/test/java/forktimeout/Test4.java ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/fork-timeout/src/test/java/forktimeout/Test4.java b/surefire-integration-tests/src/test/resources/fork-timeout/src/test/java/forktimeout/Test4.java deleted file mode 100644 index 4582c65..0000000 --- a/surefire-integration-tests/src/test/resources/fork-timeout/src/test/java/forktimeout/Test4.java +++ /dev/null @@ -1,32 +0,0 @@ -package forktimeout; -/* - * 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; - -public class Test4 - extends BaseForkTimeout -{ - @Test - public void test690_4() { - dumpStuff( "test690_4" ); - } - -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/fork-timeout/src/test/java/forktimeout/Test5.java ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/fork-timeout/src/test/java/forktimeout/Test5.java b/surefire-integration-tests/src/test/resources/fork-timeout/src/test/java/forktimeout/Test5.java deleted file mode 100644 index 886385d..0000000 --- a/surefire-integration-tests/src/test/resources/fork-timeout/src/test/java/forktimeout/Test5.java +++ /dev/null @@ -1,32 +0,0 @@ -package forktimeout; -/* - * 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; - -public class Test5 - extends BaseForkTimeout -{ - @Test - public void test690_5() { - dumpStuff( "test690_5" ); - } - -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/includes-excludes-from-file/common-excludes.txt ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/includes-excludes-from-file/common-excludes.txt b/surefire-integration-tests/src/test/resources/includes-excludes-from-file/common-excludes.txt deleted file mode 100644 index 483aae3..0000000 --- a/surefire-integration-tests/src/test/resources/includes-excludes-from-file/common-excludes.txt +++ /dev/null @@ -1,3 +0,0 @@ -# common excludes - -**/DontRunTest.* \ No newline at end of file http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/includes-excludes-from-file/path-includes.txt ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/includes-excludes-from-file/path-includes.txt b/surefire-integration-tests/src/test/resources/includes-excludes-from-file/path-includes.txt deleted file mode 100644 index cedff2a..0000000 --- a/surefire-integration-tests/src/test/resources/includes-excludes-from-file/path-includes.txt +++ /dev/null @@ -1,3 +0,0 @@ -# path includes - -*/test/* http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/includes-excludes-from-file/pom.xml ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/includes-excludes-from-file/pom.xml b/surefire-integration-tests/src/test/resources/includes-excludes-from-file/pom.xml deleted file mode 100644 index 39313db..0000000 --- a/surefire-integration-tests/src/test/resources/includes-excludes-from-file/pom.xml +++ /dev/null @@ -1,153 +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> - <modelVersion>4.0.0</modelVersion> - - <groupId>org.apache.maven.plugins.surefire</groupId> - <artifactId>maven-it-includes-excludes</artifactId> - <version>1.0-SNAPSHOT</version> - - <name>Maven Integration Test :: includes-excludes-from-file</name> - <description>Test surefire inclusion/exclusions from files</description> - - <properties> - <junit.version>3.8.2</junit.version> - <maven.compiler.source>1.7</maven.compiler.source> - <maven.compiler.target>1.7</maven.compiler.target> - </properties> - - <dependencies> - <dependency> - <artifactId>junit</artifactId> - <groupId>junit</groupId> - <version>${junit.version}</version> - <scope>test</scope> - </dependency> - </dependencies> - - <build> - <pluginManagement> - <plugins> - <plugin> - <artifactId>maven-surefire-plugin</artifactId> - <version>${surefire.version}</version> - </plugin> - </plugins> - </pluginManagement> - </build> - - <profiles> - <profile> - <id>simple</id> - <build> - <plugins> - <plugin> - <artifactId>maven-surefire-plugin</artifactId> - <configuration> - <excludesFile>${project.basedir}/common-excludes.txt</excludesFile> - <includesFile>${project.basedir}/simple-includes.txt</includesFile> - </configuration> - </plugin> - </plugins> - </build> - </profile> - - <profile> - <id>simple-mixed</id> - <build> - <plugins> - <plugin> - <artifactId>maven-surefire-plugin</artifactId> - <configuration> - <excludesFile>${project.basedir}/common-excludes.txt</excludesFile> - <includes> - <include>**/NotIncludedByDefault.java</include> - </includes> - <includesFile>${project.basedir}/simple-mixed-includes.txt</includesFile> - </configuration> - </plugin> - </plugins> - </build> - </profile> - - <profile> - <id>regex</id> - <build> - <plugins> - <plugin> - <artifactId>maven-surefire-plugin</artifactId> - <configuration> - <excludesFile>${project.basedir}/common-excludes.txt</excludesFile> - <includesFile>${project.basedir}/regex-includes.txt</includesFile> - </configuration> - </plugin> - </plugins> - </build> - </profile> - - <profile> - <id>path</id> - <build> - <plugins> - <plugin> - <artifactId>maven-surefire-plugin</artifactId> - <configuration> - <excludesFile>${project.basedir}/common-excludes.txt</excludesFile> - <includesFile>${project.basedir}/path-includes.txt</includesFile> - </configuration> - </plugin> - </plugins> - </build> - </profile> - - <profile> - <id>missing-excludes-file</id> - <build> - <plugins> - <plugin> - <artifactId>maven-surefire-plugin</artifactId> - <configuration> - <excludesFile>${project.basedir}/no-such-excludes-file</excludesFile> - <includesFile>${project.basedir}/simple-includes.txt</includesFile> - </configuration> - </plugin> - </plugins> - </build> - </profile> - - <profile> - <id>missing-includes-file</id> - <build> - <plugins> - <plugin> - <artifactId>maven-surefire-plugin</artifactId> - <configuration> - <excludesFile>${project.basedir}/common-excludes.txt</excludesFile> - <includesFile>${project.basedir}/no-such-includes-file</includesFile> - </configuration> - </plugin> - </plugins> - </build> - </profile> - - </profiles> -</project> http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/includes-excludes-from-file/regex-includes.txt ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/includes-excludes-from-file/regex-includes.txt b/surefire-integration-tests/src/test/resources/includes-excludes-from-file/regex-includes.txt deleted file mode 100644 index fcf6f9e..0000000 --- a/surefire-integration-tests/src/test/resources/includes-excludes-from-file/regex-includes.txt +++ /dev/null @@ -1,3 +0,0 @@ -# regex includes - -%regex[.*Test.*|.*Not.*] \ No newline at end of file http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/includes-excludes-from-file/simple-includes.txt ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/includes-excludes-from-file/simple-includes.txt b/surefire-integration-tests/src/test/resources/includes-excludes-from-file/simple-includes.txt deleted file mode 100644 index d2b1d12..0000000 --- a/surefire-integration-tests/src/test/resources/includes-excludes-from-file/simple-includes.txt +++ /dev/null @@ -1,4 +0,0 @@ -# simple includes - -**/NotIncludedByDefault.java -**/*Test.java \ No newline at end of file http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/includes-excludes-from-file/simple-mixed-includes.txt ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/includes-excludes-from-file/simple-mixed-includes.txt b/surefire-integration-tests/src/test/resources/includes-excludes-from-file/simple-mixed-includes.txt deleted file mode 100644 index 68a1d5c..0000000 --- a/surefire-integration-tests/src/test/resources/includes-excludes-from-file/simple-mixed-includes.txt +++ /dev/null @@ -1,3 +0,0 @@ -# simple-mixed includes - -**/*Test.java \ No newline at end of file http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/includes-excludes-from-file/src/test/java/org/test/DefaultTest.java ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/includes-excludes-from-file/src/test/java/org/test/DefaultTest.java b/surefire-integration-tests/src/test/resources/includes-excludes-from-file/src/test/java/org/test/DefaultTest.java deleted file mode 100644 index be6a6bb..0000000 --- a/surefire-integration-tests/src/test/resources/includes-excludes-from-file/src/test/java/org/test/DefaultTest.java +++ /dev/null @@ -1,34 +0,0 @@ -package org.test; - -/* - * 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.FileOutputStream; - -public class DefaultTest -{ - public void testRun() - throws Exception - { - FileOutputStream fout = new FileOutputStream( "target/defaultTestTouchFile.txt" ); - fout.write( '!' ); - fout.flush(); - fout.close(); - } -} http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/includes-excludes-from-file/src/test/java/org/test/DontRunTest.java ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/includes-excludes-from-file/src/test/java/org/test/DontRunTest.java b/surefire-integration-tests/src/test/resources/includes-excludes-from-file/src/test/java/org/test/DontRunTest.java deleted file mode 100644 index 0cce390..0000000 --- a/surefire-integration-tests/src/test/resources/includes-excludes-from-file/src/test/java/org/test/DontRunTest.java +++ /dev/null @@ -1,30 +0,0 @@ -package org.test; - -/* - * 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; - -public class DontRunTest extends TestCase -{ - public void testRun() - { - assertEquals(true, false); - } -} http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/includes-excludes-from-file/src/test/java/org/test/NotIncludedByDefault.java ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/includes-excludes-from-file/src/test/java/org/test/NotIncludedByDefault.java b/surefire-integration-tests/src/test/resources/includes-excludes-from-file/src/test/java/org/test/NotIncludedByDefault.java deleted file mode 100644 index 58b962a..0000000 --- a/surefire-integration-tests/src/test/resources/includes-excludes-from-file/src/test/java/org/test/NotIncludedByDefault.java +++ /dev/null @@ -1,34 +0,0 @@ -package org.test; - -/* - * 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.FileOutputStream; - -public class NotIncludedByDefault -{ - public void testRun() - throws Exception - { - FileOutputStream fout = new FileOutputStream( "target/testTouchFile.txt" ); - fout.write( '!' ); - fout.flush(); - fout.close(); - } -} http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/includes-excludes-from-file/src/test/java/org/test/aTestXmlFile.xml ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/includes-excludes-from-file/src/test/java/org/test/aTestXmlFile.xml b/surefire-integration-tests/src/test/resources/includes-excludes-from-file/src/test/java/org/test/aTestXmlFile.xml deleted file mode 100644 index 17f382f..0000000 --- a/surefire-integration-tests/src/test/resources/includes-excludes-from-file/src/test/java/org/test/aTestXmlFile.xml +++ /dev/null @@ -1,24 +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> - <foo/> -</project> http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/includes-excludes/pom.xml ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/includes-excludes/pom.xml b/surefire-integration-tests/src/test/resources/includes-excludes/pom.xml deleted file mode 100644 index 77711f7..0000000 --- a/surefire-integration-tests/src/test/resources/includes-excludes/pom.xml +++ /dev/null @@ -1,135 +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> - <modelVersion>4.0.0</modelVersion> - - <groupId>org.apache.maven.plugins.surefire</groupId> - <artifactId>maven-it-includes-excludes</artifactId> - <version>1.0-SNAPSHOT</version> - - <name>Maven Integration Test :: includes-excludes</name> - <description>Test surefire inclusion/exclusions</description> - - <properties> - <junit.version>3.8.2</junit.version> - <maven.compiler.source>1.7</maven.compiler.source> - <maven.compiler.target>1.7</maven.compiler.target> - </properties> - - <dependencies> - <dependency> - <artifactId>junit</artifactId> - <groupId>junit</groupId> - <version>${junit.version}</version> - <scope>test</scope> - </dependency> - </dependencies> - - <build> - <pluginManagement> - <plugins> - <plugin> - <artifactId>maven-surefire-plugin</artifactId> - <version>${surefire.version}</version> - </plugin> - </plugins> - </pluginManagement> - </build> - <profiles> - <profile> - <id>simple</id> - <build> - <plugins> - <plugin> - <artifactId>maven-surefire-plugin</artifactId> - <configuration> - <excludes> - <exclude>**/DontRunTest.*</exclude> - <exclude></exclude> - <exclude /> - </excludes> - <includes> - <include>**/NotIncludedByDefault.java</include> - <include>**/*Test.java</include> - </includes> - </configuration> - </plugin> - </plugins> - </build> - </profile> - <profile> - <id>regex</id> - <build> - <plugins> - <plugin> - <artifactId>maven-surefire-plugin</artifactId> - <configuration> - <excludes> - <exclude>**/DontRunTest.*</exclude> - </excludes> - <includes> - <include>%regex[.*Test.*|.*Not.*]</include> - </includes> - </configuration> - </plugin> - </plugins> - </build> - </profile> - <profile> - <id>path</id> - <build> - <plugins> - <plugin> - <artifactId>maven-surefire-plugin</artifactId> - <configuration> - <excludes> - <exclude>**/DontRunTest.java</exclude> - </excludes> - <includes> - <include>*/test/*</include> - </includes> - </configuration> - </plugin> - </plugins> - </build> - </profile> - <profile> - <id>withXmlFile</id> - <build> - <plugins> - <plugin> - <artifactId>maven-surefire-plugin</artifactId> - <configuration> - <excludes> - <exclude>**/DontRunTest.java</exclude> - </excludes> - <includes> - <include>**/*.xml</include> - </includes> - </configuration> - </plugin> - </plugins> - </build> - </profile> - - </profiles> -</project> http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/includes-excludes/src/test/java/org/test/DefaultTest.java ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/includes-excludes/src/test/java/org/test/DefaultTest.java b/surefire-integration-tests/src/test/resources/includes-excludes/src/test/java/org/test/DefaultTest.java deleted file mode 100644 index be6a6bb..0000000 --- a/surefire-integration-tests/src/test/resources/includes-excludes/src/test/java/org/test/DefaultTest.java +++ /dev/null @@ -1,34 +0,0 @@ -package org.test; - -/* - * 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.FileOutputStream; - -public class DefaultTest -{ - public void testRun() - throws Exception - { - FileOutputStream fout = new FileOutputStream( "target/defaultTestTouchFile.txt" ); - fout.write( '!' ); - fout.flush(); - fout.close(); - } -} http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/includes-excludes/src/test/java/org/test/DontRunTest.java ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/includes-excludes/src/test/java/org/test/DontRunTest.java b/surefire-integration-tests/src/test/resources/includes-excludes/src/test/java/org/test/DontRunTest.java deleted file mode 100644 index 0cce390..0000000 --- a/surefire-integration-tests/src/test/resources/includes-excludes/src/test/java/org/test/DontRunTest.java +++ /dev/null @@ -1,30 +0,0 @@ -package org.test; - -/* - * 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; - -public class DontRunTest extends TestCase -{ - public void testRun() - { - assertEquals(true, false); - } -} http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/includes-excludes/src/test/java/org/test/NotIncludedByDefault.java ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/includes-excludes/src/test/java/org/test/NotIncludedByDefault.java b/surefire-integration-tests/src/test/resources/includes-excludes/src/test/java/org/test/NotIncludedByDefault.java deleted file mode 100644 index 58b962a..0000000 --- a/surefire-integration-tests/src/test/resources/includes-excludes/src/test/java/org/test/NotIncludedByDefault.java +++ /dev/null @@ -1,34 +0,0 @@ -package org.test; - -/* - * 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.FileOutputStream; - -public class NotIncludedByDefault -{ - public void testRun() - throws Exception - { - FileOutputStream fout = new FileOutputStream( "target/testTouchFile.txt" ); - fout.write( '!' ); - fout.flush(); - fout.close(); - } -} http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/includes-excludes/src/test/java/org/test/aTestXmlFile.xml ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/includes-excludes/src/test/java/org/test/aTestXmlFile.xml b/surefire-integration-tests/src/test/resources/includes-excludes/src/test/java/org/test/aTestXmlFile.xml deleted file mode 100644 index 17f382f..0000000 --- a/surefire-integration-tests/src/test/resources/includes-excludes/src/test/java/org/test/aTestXmlFile.xml +++ /dev/null @@ -1,24 +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> - <foo/> -</project> http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/isolated-classloader/pom.xml ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/isolated-classloader/pom.xml b/surefire-integration-tests/src/test/resources/isolated-classloader/pom.xml deleted file mode 100644 index a853063..0000000 --- a/surefire-integration-tests/src/test/resources/isolated-classloader/pom.xml +++ /dev/null @@ -1,56 +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.apache.maven.plugins.surefire</groupId> - <artifactId>isolated-classloader</artifactId> - <version>1.0-SNAPSHOT</version> - <name>Test for useSystemClassLoader=false</name> - - <properties> - <maven.compiler.source>1.7</maven.compiler.source> - <maven.compiler.target>1.7</maven.compiler.target> - </properties> - - <build> - <plugins> - <plugin> - <artifactId>maven-surefire-plugin</artifactId> - <version>${surefire.version}</version> - <configuration> - <useSystemClassLoader>false</useSystemClassLoader> - </configuration> - </plugin> - </plugins> - </build> - <dependencies> - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>3.8.1</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/isolated-classloader/src/test/java/isolatedClassloader/BasicTest.java ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/isolated-classloader/src/test/java/isolatedClassloader/BasicTest.java b/surefire-integration-tests/src/test/resources/isolated-classloader/src/test/java/isolatedClassloader/BasicTest.java deleted file mode 100644 index f293734..0000000 --- a/surefire-integration-tests/src/test/resources/isolated-classloader/src/test/java/isolatedClassloader/BasicTest.java +++ /dev/null @@ -1,86 +0,0 @@ -package isolatedClassloader; - -/* - * 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.extensions.TestSetup; -import junit.framework.Test; -import junit.framework.TestCase; -import junit.framework.TestSuite; - -public class BasicTest - extends TestCase -{ - - private boolean setUpCalled = false; - - private static boolean tearDownCalled = false; - - public BasicTest( String name, String extraName ) - { - super( name ); - } - - public static Test suite() - { - TestSuite suite = new TestSuite(); - Test test = new BasicTest( "testSetUp", "dummy" ); - suite.addTest( test ); - - return new TestSetup( suite ) - { - - protected void setUp() - { - //oneTimeSetUp(); - } - - protected void tearDown() - { - oneTimeTearDown(); - } - - }; - } - - protected void setUp() - { - setUpCalled = true; - tearDownCalled = false; - System.out.println( "Called setUp" ); - } - - protected void tearDown() - { - setUpCalled = false; - tearDownCalled = true; - System.out.println( "Called tearDown" ); - } - - public void testSetUp() - { - assertTrue( "setUp was not called", setUpCalled ); - } - - public static void oneTimeTearDown() - { - assertTrue( "tearDown was not called", tearDownCalled ); - } - -} http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/java9-full-api/pom.xml ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/java9-full-api/pom.xml b/surefire-integration-tests/src/test/resources/java9-full-api/pom.xml deleted file mode 100644 index 2e4d4f3..0000000 --- a/surefire-integration-tests/src/test/resources/java9-full-api/pom.xml +++ /dev/null @@ -1,132 +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> - - <artifactId>java9-full-api</artifactId> - - <build> - <plugins> - <plugin> - <artifactId>maven-surefire-plugin</artifactId> - <configuration> - <forkMode>once</forkMode> - </configuration> - </plugin> - <plugin> - <artifactId>maven-failsafe-plugin</artifactId> - <executions> - <execution> - <goals> - <goal>integration-test</goal> - <goal>verify</goal> - </goals> - </execution> - </executions> - <configuration> - <forkMode>once</forkMode> - </configuration> - </plugin> - </plugins> - </build> - - <dependencies> - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>4.12</version> - <scope>test</scope> - </dependency> - <dependency> - <groupId>javax.transaction</groupId> - <artifactId>javax.transaction-api</artifactId> - <version>1.2</version> - </dependency> - <dependency> - <groupId>javax.xml.ws</groupId> - <artifactId>jaxws-api</artifactId> - <version>2.3.0</version> - </dependency> - <dependency> - <groupId>javax.xml.bind</groupId> - <artifactId>jaxb-api</artifactId> - <version>2.3.0</version> - </dependency> - </dependencies> - - <profiles> - <profile> - <id>use-jvm-config-paramater</id> - <activation> - <property> - <name>jdk.home</name> - </property> - </activation> - <build> - <plugins> - <plugin> - <artifactId>maven-surefire-plugin</artifactId> - <configuration> - <jvm>${jdk.home}/bin/java</jvm> - </configuration> - </plugin> - </plugins> - </build> - </profile> - <profile> - <id>use-toolchains</id> - <build> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-toolchains-plugin</artifactId> - <version>1.1</version> - <executions> - <execution> - <phase>validate</phase> - <goals> - <goal>toolchain</goal> - </goals> - </execution> - </executions> - <configuration> - <toolchains> - <jdk> - <version>9</version> - </jdk> - </toolchains> - </configuration> - </plugin> - </plugins> - </build> - </profile> - </profiles> - -</project> http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/java9-full-api/src/test/java/J9IT.java ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/java9-full-api/src/test/java/J9IT.java b/surefire-integration-tests/src/test/resources/java9-full-api/src/test/java/J9IT.java deleted file mode 100644 index c74678d..0000000 --- a/surefire-integration-tests/src/test/resources/java9-full-api/src/test/java/J9IT.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * 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; - -public class J9IT -{ - @Test - public void testMiscellaneousAPI() throws java.sql.SQLException - { - System.out.println( "loaded class " + java.sql.SQLException.class.getName() ); - System.out.println( "loaded class " + javax.xml.ws.Holder.class.getName() ); - System.out.println( "loaded class " + javax.xml.bind.JAXBException.class.getName() ); - System.out.println( "loaded class " + javax.transaction.InvalidTransactionException.class.getName() ); - System.out.println( "from classloader " + javax.transaction.InvalidTransactionException.class.getClassLoader() ); - System.out.println( "loaded class " + javax.transaction.TransactionManager.class.getName() ); - System.out.println( "loaded class " + javax.xml.xpath.XPath.class.getName() ); - System.out.println( "java.specification.version=" + System.getProperty( "java.specification.version" ) ); - } - -} http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/java9-full-api/src/test/java/J9Test.java ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/java9-full-api/src/test/java/J9Test.java b/surefire-integration-tests/src/test/resources/java9-full-api/src/test/java/J9Test.java deleted file mode 100644 index 6fc8536..0000000 --- a/surefire-integration-tests/src/test/resources/java9-full-api/src/test/java/J9Test.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * 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; - -public class J9Test -{ - @Test - public void testMiscellaneousAPI() throws java.sql.SQLException - { - System.out.println( "loaded class " + java.sql.SQLException.class.getName() ); - System.out.println( "loaded class " + javax.xml.ws.Holder.class.getName() ); - System.out.println( "loaded class " + javax.xml.bind.JAXBException.class.getName() ); - System.out.println( "loaded class " + javax.transaction.InvalidTransactionException.class.getName() ); - System.out.println( "loaded class " + javax.transaction.TransactionManager.class.getName() ); - System.out.println( "loaded class " + javax.xml.xpath.XPath.class.getName() ); - System.out.println( "java.specification.version=" + System.getProperty( "java.specification.version" ) ); - } - -} http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/junit-fork-mode-always/pom.xml ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/junit-fork-mode-always/pom.xml b/surefire-integration-tests/src/test/resources/junit-fork-mode-always/pom.xml deleted file mode 100644 index 9b86c75..0000000 --- a/surefire-integration-tests/src/test/resources/junit-fork-mode-always/pom.xml +++ /dev/null @@ -1,57 +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.apache.maven.plugins.surefire</groupId> - <artifactId>testng-fork-mode</artifactId> - <version>1.0-SNAPSHOT</version> - <name>Test for forkMode</name> - - <properties> - <maven.compiler.source>1.7</maven.compiler.source> - <maven.compiler.target>1.7</maven.compiler.target> - </properties> - - <build> - <plugins> - <plugin> - <artifactId>maven-surefire-plugin</artifactId> - <version>${surefire.version}</version> - <configuration> - <forkMode>${forkMode}</forkMode> - </configuration> - </plugin> - </plugins> - </build> - - <dependencies> - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>4.8.2</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/junit-fork-mode-always/src/test/java/junit4/forkMode/Test1.java ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/junit-fork-mode-always/src/test/java/junit4/forkMode/Test1.java b/surefire-integration-tests/src/test/resources/junit-fork-mode-always/src/test/java/junit4/forkMode/Test1.java deleted file mode 100644 index d206283..0000000 --- a/surefire-integration-tests/src/test/resources/junit-fork-mode-always/src/test/java/junit4/forkMode/Test1.java +++ /dev/null @@ -1,60 +0,0 @@ -package junit4.forkMode; - -/* - * 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 java.io.FileWriter; -import java.io.IOException; -import java.lang.management.ManagementFactory; - -import org.junit.Test; - -public class Test1 -{ - - @Test - public void test1() - throws IOException - { - dumpPidFile( "test1" ); - } - - public static void dumpPidFile( String name ) - throws IOException - { - String fileName = name + "-pid"; - File target = new File( "target" ); - if ( !( target.exists() && target.isDirectory() ) ) - { - target = new File( "." ); - } - File pidFile = new File( target, fileName ); - FileWriter fw = new FileWriter( pidFile ); - // DGF little known trick... this is guaranteed to be unique to the PID - // In fact, it usually contains the pid and the local host name! - String pid = ManagementFactory.getRuntimeMXBean().getName(); - fw.write( pid ); - fw.flush(); - fw.close(); - - System.out.println( "pid = " + pid ); - } - -} http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/junit-fork-mode-always/src/test/java/junit4/forkMode/Test2.java ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/junit-fork-mode-always/src/test/java/junit4/forkMode/Test2.java b/surefire-integration-tests/src/test/resources/junit-fork-mode-always/src/test/java/junit4/forkMode/Test2.java deleted file mode 100644 index f57f1b8..0000000 --- a/surefire-integration-tests/src/test/resources/junit-fork-mode-always/src/test/java/junit4/forkMode/Test2.java +++ /dev/null @@ -1,36 +0,0 @@ -package junit4.forkMode; - -/* - * 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 org.junit.Test; - -public class Test2 -{ - - @Test - public void test2() - throws IOException - { - Test1.dumpPidFile( "test2" ); - } - -} http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/junit-fork-mode-always/src/test/java/junit4/forkMode/Test3.java ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/junit-fork-mode-always/src/test/java/junit4/forkMode/Test3.java b/surefire-integration-tests/src/test/resources/junit-fork-mode-always/src/test/java/junit4/forkMode/Test3.java deleted file mode 100644 index af7f6fd..0000000 --- a/surefire-integration-tests/src/test/resources/junit-fork-mode-always/src/test/java/junit4/forkMode/Test3.java +++ /dev/null @@ -1,36 +0,0 @@ -package junit4.forkMode; - -/* - * 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 org.junit.Test; - -public class Test3 -{ - - @Test - public void test3() - throws IOException - { - Test1.dumpPidFile( "test3" ); - } - -}