Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimone Bordet2015-10-26 10:02:09 +0000
committerSimone Bordet2015-10-26 10:02:09 +0000
commit8d51a2541804a3136d4b32886c04f33b86256454 (patch)
tree15a59089fe6e52eab39d5a713b27115047b248fd
parent39768f841a90715904aa19d65145be22a68d0892 (diff)
parent08c59628c9c61ecbc7fd90d763696a2a64fe586d (diff)
downloadorg.eclipse.jetty.project-8d51a2541804a3136d4b32886c04f33b86256454.tar.gz
org.eclipse.jetty.project-8d51a2541804a3136d4b32886c04f33b86256454.tar.xz
org.eclipse.jetty.project-8d51a2541804a3136d4b32886c04f33b86256454.zip
Merged branch 'jetty-9.3.x' into 'master'.
-rw-r--r--tests/test-http-client-transport/pom.xml6
-rw-r--r--tests/test-http-client-transport/src/test/java/org/eclipse/jetty/http/client/AbstractTest.java16
-rw-r--r--tests/test-http-client-transport/src/test/java/org/eclipse/jetty/http/client/HttpClientTest.java1
3 files changed, 21 insertions, 2 deletions
diff --git a/tests/test-http-client-transport/pom.xml b/tests/test-http-client-transport/pom.xml
index 321d387c0c..ec608ac8bc 100644
--- a/tests/test-http-client-transport/pom.xml
+++ b/tests/test-http-client-transport/pom.xml
@@ -90,6 +90,12 @@
<scope>test</scope>
</dependency>
<dependency>
+ <groupId>org.eclipse.jetty.fcgi</groupId>
+ <artifactId>fcgi-server</artifactId>
+ <version>${project.version}</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
diff --git a/tests/test-http-client-transport/src/test/java/org/eclipse/jetty/http/client/AbstractTest.java b/tests/test-http-client-transport/src/test/java/org/eclipse/jetty/http/client/AbstractTest.java
index ca377c311c..bebe9bb84c 100644
--- a/tests/test-http-client-transport/src/test/java/org/eclipse/jetty/http/client/AbstractTest.java
+++ b/tests/test-http-client-transport/src/test/java/org/eclipse/jetty/http/client/AbstractTest.java
@@ -25,6 +25,8 @@ import org.eclipse.jetty.alpn.server.ALPNServerConnectionFactory;
import org.eclipse.jetty.client.HttpClient;
import org.eclipse.jetty.client.HttpClientTransport;
import org.eclipse.jetty.client.http.HttpClientTransportOverHTTP;
+import org.eclipse.jetty.fcgi.client.http.HttpClientTransportOverFCGI;
+import org.eclipse.jetty.fcgi.server.ServerFCGIConnectionFactory;
import org.eclipse.jetty.http2.HTTP2Cipher;
import org.eclipse.jetty.http2.client.HTTP2Client;
import org.eclipse.jetty.http2.client.http.HttpClientTransportOverHTTP2;
@@ -52,7 +54,7 @@ public abstract class AbstractTest
@Parameterized.Parameters(name = "transport: {0}")
public static Object[] parameters() throws Exception
{
- return new Object[]{Transport.HTTP, Transport.HTTPS, Transport.H2C, Transport.H2};
+ return Transport.values();
}
@Rule
@@ -139,6 +141,11 @@ public abstract class AbstractTest
result.add(h2);
break;
}
+ case FCGI:
+ {
+ result.add(new ServerFCGIConnectionFactory(new HttpConfiguration()));
+ break;
+ }
default:
{
throw new IllegalArgumentException();
@@ -163,6 +170,10 @@ public abstract class AbstractTest
http2Client.setSelectors(1);
return new HttpClientTransportOverHTTP2(http2Client);
}
+ case FCGI:
+ {
+ return new HttpClientTransportOverFCGI(1, false, "");
+ }
default:
{
throw new IllegalArgumentException();
@@ -176,6 +187,7 @@ public abstract class AbstractTest
{
case HTTP:
case H2C:
+ case FCGI:
return "http://localhost:" + connector.getLocalPort();
case HTTPS:
case H2:
@@ -196,6 +208,6 @@ public abstract class AbstractTest
protected enum Transport
{
- HTTP, HTTPS, H2C, H2
+ HTTP, HTTPS, H2C, H2, FCGI
}
}
diff --git a/tests/test-http-client-transport/src/test/java/org/eclipse/jetty/http/client/HttpClientTest.java b/tests/test-http-client-transport/src/test/java/org/eclipse/jetty/http/client/HttpClientTest.java
index 56ffdd156d..5a17404c55 100644
--- a/tests/test-http-client-transport/src/test/java/org/eclipse/jetty/http/client/HttpClientTest.java
+++ b/tests/test-http-client-transport/src/test/java/org/eclipse/jetty/http/client/HttpClientTest.java
@@ -91,6 +91,7 @@ public class HttpClientTest extends AbstractTest
public void handle(String target, Request baseRequest, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException
{
baseRequest.setHandled(true);
+ response.setContentLength(length);
response.getOutputStream().write(bytes);
}
});

Back to the top