Issue #6728 - QUIC and HTTP/3

- More fixes and improvement to HTTP client transport tests.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
This commit is contained in:
Simone Bordet 2021-10-27 13:05:05 +02:00
parent 40aba07e33
commit 00a4001b5c
1 changed files with 4 additions and 2 deletions

View File

@ -85,6 +85,7 @@ import static org.eclipse.jetty.http.client.Transport.FCGI;
import static org.eclipse.jetty.http.client.Transport.H2C; import static org.eclipse.jetty.http.client.Transport.H2C;
import static org.eclipse.jetty.http.client.Transport.H3; import static org.eclipse.jetty.http.client.Transport.H3;
import static org.eclipse.jetty.http.client.Transport.HTTP; import static org.eclipse.jetty.http.client.Transport.HTTP;
import static org.eclipse.jetty.http.client.Transport.UNIX_DOMAIN;
import static org.eclipse.jetty.util.BufferUtil.toArray; import static org.eclipse.jetty.util.BufferUtil.toArray;
import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.containsString; import static org.hamcrest.Matchers.containsString;
@ -1085,7 +1086,6 @@ public class AsyncIOServletTest extends AbstractTest<AsyncIOServletTest.AsyncTra
// only generates the close alert back, without encrypting the // only generates the close alert back, without encrypting the
// response, so we need to skip the transports over TLS. // response, so we need to skip the transports over TLS.
Assumptions.assumeFalse(scenario.transport.isTlsBased()); Assumptions.assumeFalse(scenario.transport.isTlsBased());
Assumptions.assumeFalse(scenario.transport == FCGI);
String content = "jetty"; String content = "jetty";
int responseCode = HttpStatus.NO_CONTENT_204; int responseCode = HttpStatus.NO_CONTENT_204;
@ -1136,7 +1136,7 @@ public class AsyncIOServletTest extends AbstractTest<AsyncIOServletTest.AsyncTra
.body(requestContent) .body(requestContent)
.onResponseSuccess(response -> .onResponseSuccess(response ->
{ {
if (transport == HTTP) if (transport == HTTP || transport == UNIX_DOMAIN)
responseLatch.countDown(); responseLatch.countDown();
}) })
.onResponseFailure((response, failure) -> .onResponseFailure((response, failure) ->
@ -1155,6 +1155,7 @@ public class AsyncIOServletTest extends AbstractTest<AsyncIOServletTest.AsyncTra
switch (transport) switch (transport)
{ {
case HTTP: case HTTP:
case UNIX_DOMAIN:
assertThat(result.getResponse().getStatus(), Matchers.equalTo(responseCode)); assertThat(result.getResponse().getStatus(), Matchers.equalTo(responseCode));
break; break;
case H2C: case H2C:
@ -1172,6 +1173,7 @@ public class AsyncIOServletTest extends AbstractTest<AsyncIOServletTest.AsyncTra
switch (transport) switch (transport)
{ {
case HTTP: case HTTP:
case UNIX_DOMAIN:
((HttpConnectionOverHTTP)connection).getEndPoint().shutdownOutput(); ((HttpConnectionOverHTTP)connection).getEndPoint().shutdownOutput();
break; break;
case H2C: case H2C: