Issue #1743 WIP tests

Signed-off-by: Jan Bartel <janb@webtide.com>
This commit is contained in:
Jan Bartel 2019-09-18 18:29:14 +10:00
parent 946955c00c
commit 9f296e1666
12 changed files with 20 additions and 16 deletions

View File

@ -1,2 +0,0 @@
invoker.goals = verify -V
#test-compile failsafe:integration-test

View File

@ -0,0 +1,2 @@
invoker.goals = verify -V -X
#test-compile failsafe:integration-test

View File

@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<parent> <parent>
<groupId>org.eclipse.jetty.its.jetty-run-war-mojo-it</groupId> <groupId>org.eclipse.jetty.its.jetty-start-war-distro-mojo-it</groupId>
<artifactId>jetty-simple-project</artifactId> <artifactId>jetty-simple-project</artifactId>
<version>0.0.1-SNAPSHOT</version> <version>0.0.1-SNAPSHOT</version>
</parent> </parent>

View File

@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<parent> <parent>
<groupId>org.eclipse.jetty.its.jetty-run-war-mojo-it</groupId> <groupId>org.eclipse.jetty.its.jetty-start-war-distro-mojo-it</groupId>
<artifactId>jetty-simple-project</artifactId> <artifactId>jetty-simple-project</artifactId>
<version>0.0.1-SNAPSHOT</version> <version>0.0.1-SNAPSHOT</version>
</parent> </parent>
@ -14,12 +14,12 @@
<name>Jetty :: Simple :: Webapp</name> <name>Jetty :: Simple :: Webapp</name>
<properties> <properties>
<jetty.port.file>${project.build.directory}/jetty-run-war-port.txt</jetty.port.file> <jetty.port.file>${project.build.directory}/jetty-start-war-distro-port.txt</jetty.port.file>
<jetty.runType>EMBED</jetty.runType> <jetty.runType>DISTRO</jetty.runType>
</properties> </properties>
<dependencies> <dependencies>
<dependency> <dependency>
<groupId>org.eclipse.jetty.its.jetty-run-war-mojo-it</groupId> <groupId>org.eclipse.jetty.its.jetty-start-war-distro-mojo-it</groupId>
<artifactId>jetty-simple-base</artifactId> <artifactId>jetty-simple-base</artifactId>
</dependency> </dependency>
<dependency> <dependency>
@ -100,15 +100,17 @@
<executions> <executions>
<execution> <execution>
<id>start-jetty</id> <id>start-jetty</id>
<phase>test-compile</phase> <phase>pre-integration-test</phase>
<goals> <goals>
<goal>newrun-war</goal> <goal>newstart-war</goal>
</goals> </goals>
<configuration> <configuration>
<nonBlocking>true</nonBlocking> <webApp>
<systemProperties> <war>${project.build.directory}/${project.artifactId}-${project.version}</war>
</webApp>
<jettyProperties>
<jetty.port.file>${jetty.port.file}</jetty.port.file> <jetty.port.file>${jetty.port.file}</jetty.port.file>
</systemProperties> </jettyProperties>
<jettyXmls> <jettyXmls>
<jettyXml>${basedir}/src/config/jetty.xml</jettyXml> <jettyXml>${basedir}/src/config/jetty.xml</jettyXml>
</jettyXmls> </jettyXmls>

View File

@ -8,7 +8,7 @@
<version>0.0.1-SNAPSHOT</version> <version>0.0.1-SNAPSHOT</version>
</parent> </parent>
<groupId>org.eclipse.jetty.its.jetty-run-war-mojo-it</groupId> <groupId>org.eclipse.jetty.its.jetty-start-war-distro-mojo-it</groupId>
<artifactId>jetty-simple-project</artifactId> <artifactId>jetty-simple-project</artifactId>
<version>0.0.1-SNAPSHOT</version> <version>0.0.1-SNAPSHOT</version>
<packaging>pom</packaging> <packaging>pom</packaging>
@ -30,7 +30,7 @@
<dependencyManagement> <dependencyManagement>
<dependencies> <dependencies>
<dependency> <dependency>
<groupId>org.eclipse.jetty.its.jetty-run-war-mojo-it</groupId> <groupId>org.eclipse.jetty.its.jetty-start-war-distro-mojo-it</groupId>
<artifactId>jetty-simple-base</artifactId> <artifactId>jetty-simple-base</artifactId>
<version>${project.version}</version> <version>${project.version}</version>
</dependency> </dependency>

View File

@ -17,7 +17,7 @@
* under the License. * under the License.
*/ */
File buildLog = new File( basedir, 'build.log' ) File buildLog = new File( basedir, 'build.log' )
assert buildLog.text.contains( 'Started Server' ) assert buildLog.text.contains( 'Distro process starting' )
assert buildLog.text.contains( 'Running org.eclipse.jetty.maven.plugin.it.TestGetContent') assert buildLog.text.contains( 'Running org.eclipse.jetty.maven.plugin.it.TestGetContent')
assert buildLog.text.contains( 'pingServlet ok') assert buildLog.text.contains( 'pingServlet ok')
assert buildLog.text.contains( 'helloServlet') assert buildLog.text.contains( 'helloServlet')

View File

@ -229,6 +229,8 @@ public class JettyDistroForker extends AbstractForker
ProcessBuilder builder = new ProcessBuilder(cmd); ProcessBuilder builder = new ProcessBuilder(cmd);
builder.directory(workDir); builder.directory(workDir);
PluginLog.getLog().info("Distro process starting");
//set up extra environment vars if there are any //set up extra environment vars if there are any
if (!env.isEmpty()) if (!env.isEmpty())
builder.environment().putAll(env); builder.environment().putAll(env);