Merge branch 'jetty-9.4.x' into jetty-10.0.x

This commit is contained in:
olivier lamy 2018-09-25 20:54:14 +10:00
commit 3682638961
10 changed files with 16 additions and 6 deletions

View File

@ -57,6 +57,7 @@
<systemPropertyVariables>
<jetty.port.file>${jetty.port.file}</jetty.port.file>
<helloServlet>true</helloServlet>
<maven.it.name>${project.groupId}:${project.artifactId}</maven.it.name>
</systemPropertyVariables>
<dependenciesToScan>
<dependency>org.eclipse.jetty:jetty-maven-plugin</dependency>

View File

@ -43,6 +43,7 @@
<configuration>
<systemPropertyVariables>
<jetty.port.file>${jetty.port.file}</jetty.port.file>
<maven.it.name>${project.groupId}:${project.artifactId}</maven.it.name>
<contentCheck>Bean Validation Webapp example</contentCheck>
</systemPropertyVariables>
<dependenciesToScan>

View File

@ -70,6 +70,7 @@
<jetty.port.file>${jetty.port.file}</jetty.port.file>
<pingServlet>true</pingServlet>
<helloServlet>true</helloServlet>
<maven.it.name>${project.groupId}:${project.artifactId}</maven.it.name>
</systemPropertyVariables>
<dependenciesToScan>
<dependency>org.eclipse.jetty:jetty-maven-plugin</dependency>

View File

@ -70,6 +70,7 @@
<jetty.port.file>${jetty.port.file}</jetty.port.file>
<pingServlet>true</pingServlet>
<helloServlet>true</helloServlet>
<maven.it.name>${project.groupId}:${project.artifactId}</maven.it.name>
</systemPropertyVariables>
<dependenciesToScan>
<dependency>org.eclipse.jetty:jetty-maven-plugin</dependency>

View File

@ -73,6 +73,7 @@
<jetty.port.file>${jetty.port.file}</jetty.port.file>
<pingServlet>true</pingServlet>
<helloServlet>true</helloServlet>
<maven.it.name>${project.groupId}:${project.artifactId}</maven.it.name>
</systemPropertyVariables>
<dependenciesToScan>
<dependency>org.eclipse.jetty:jetty-maven-plugin</dependency>

View File

@ -71,6 +71,7 @@
<jetty.port.file>${jetty.port.file}</jetty.port.file>
<pingServlet>true</pingServlet>
<helloServlet>true</helloServlet>
<maven.it.name>${project.groupId}:${project.artifactId}</maven.it.name>
</systemPropertyVariables>
<dependenciesToScan>
<dependency>org.eclipse.jetty:jetty-maven-plugin</dependency>

View File

@ -71,6 +71,7 @@
<jetty.port.file>${jetty.port.file}</jetty.port.file>
<pingServlet>true</pingServlet>
<helloServlet>true</helloServlet>
<maven.it.name>${project.groupId}:${project.artifactId}</maven.it.name>
</systemPropertyVariables>
<dependenciesToScan>
<dependency>org.eclipse.jetty:jetty-maven-plugin</dependency>

View File

@ -69,6 +69,7 @@
<jetty.port.file>${jetty.port.file}</jetty.port.file>
<pingServlet>true</pingServlet>
<helloServlet>true</helloServlet>
<maven.it.name>${project.groupId}:${project.artifactId}</maven.it.name>
</systemPropertyVariables>
<dependenciesToScan>
<dependency>org.eclipse.jetty:jetty-maven-plugin</dependency>

View File

@ -74,6 +74,7 @@
<systemPropertyVariables>
<jetty.port.file>${jetty.port.file}</jetty.port.file>
<contentCheck>Please enter your name</contentCheck>
<maven.it.name>${project.groupId}:${project.artifactId}</maven.it.name>
</systemPropertyVariables>
<dependenciesToScan>
<dependency>org.eclipse.jetty:jetty-maven-plugin</dependency>

View File

@ -51,23 +51,24 @@ public class TestGetContent
if (Boolean.getBoolean( "helloServlet" ))
{
String response = httpClient.GET( "http://localhost:" + port + "/hello?name=beer" ).getContentAsString();
assertEquals( "Hello beer", response.trim() );
assertEquals( "Hello beer", response.trim(), "it test " + System.getProperty( "maven.it.name" ) );
response = httpClient.GET( "http://localhost:" + port + "/hello?name=foo" ).getContentAsString();
assertEquals( "Hello foo", response.trim() );
assertEquals( "Hello foo", response.trim(), "it test " + System.getProperty( "maven.it.name" ) );
System.out.println( "helloServlet" );
}
if (Boolean.getBoolean( "pingServlet" ))
{
System.out.println( "pingServlet ok" );
String response = httpClient.GET( "http://localhost:" + port + "/ping?name=beer" ).getContentAsString();
assertEquals( "pong beer", response.trim() );
System.out.println( "pingServlet" );
String response = httpClient.GET( "http://localhost:" + port + "/ping?name=beer" ).getContentAsString();
assertEquals( "pong beer", response.trim(), "it test " + System.getProperty( "maven.it.name" ) );
System.out.println( "pingServlet ok" );
}
String contentCheck = System.getProperty( "contentCheck" );
if(StringUtils.isNotBlank( contentCheck ) )
{
String response = httpClient.GET( "http://localhost:" + port ).getContentAsString();
assertTrue(response.contains(contentCheck), "response not contentCheck: " + contentCheck + ", response:" + response);
assertTrue(response.contains(contentCheck), "it test " + System.getProperty( "maven.it.name" )
+ ", response not contentCheck: " + contentCheck + ", response:" + response);
System.out.println( "contentCheck" );
}
}