Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion distribution/src/main/release/samples/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<cxf.spring.boot.version>4.0.6</cxf.spring.boot.version>
<cxf.spring.cloud.eureka.version>5.0.1</cxf.spring.cloud.eureka.version>
<cxf.jetty12.version>12.1.8</cxf.jetty12.version>
<cxf.jetty12.version>12.1.9</cxf.jetty12.version>
<cxf.netty.version>4.2.13.Final</cxf.netty.version>
<cxf.httpcomponents.client.version>4.5.14</cxf.httpcomponents.client.version>
<cxf.swagger.ui.version>5.32.5</cxf.swagger.ui.version>
Expand Down
2 changes: 1 addition & 1 deletion parent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@
<cxf.jcache.version>1.1.1</cxf.jcache.version>
<cxf.jdom.version>1.0</cxf.jdom.version>
<cxf.jettison.version>1.5.5</cxf.jettison.version>
<cxf.jetty12.version>12.1.8</cxf.jetty12.version>
<cxf.jetty12.version>12.1.9</cxf.jetty12.version>
<cxf.jetty.version>${cxf.jetty12.version}</cxf.jetty.version>
<cxf.jexl.version>3.6.2</cxf.jexl.version>
<cxf.joda.time.version>2.10.10</cxf.joda.time.version>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
abstract class AbstractJettyClientServerHttp2Test extends AbstractBusClientServerTestBase {
@Test
public void testBookNotFoundWithHttp2() throws Exception {
final Http2TestClient client = new Http2TestClient(isSecure());
final Http2TestClient client = new Http2TestClient(isSecure(), getPort());

final ClientResponse response = client
.request(getAddress())
Expand All @@ -53,7 +53,7 @@ public void testBookNotFoundWithHttp2() throws Exception {

@Test
public void testBookWithHttp2() throws Exception {
final Http2TestClient client = new Http2TestClient(isSecure());
final Http2TestClient client = new Http2TestClient(isSecure(), getPort());

final ClientResponse response = client
.request(getAddress())
Expand All @@ -69,7 +69,7 @@ public void testBookWithHttp2() throws Exception {

@Test
public void testGetBookStreamHttp2() throws Exception {
final Http2TestClient client = new Http2TestClient(isSecure());
final Http2TestClient client = new Http2TestClient(isSecure(), getPort());

final ClientResponse response = client
.request(getAddress())
Expand Down Expand Up @@ -142,6 +142,7 @@ public void testBookWithHttp2Redirect() throws Exception {

protected abstract String getAddress();
protected abstract String getContext();
protected abstract int getPort();

protected boolean isSecure() {
return getAddress().startsWith("https");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,9 @@
public class Http2TestClient implements AutoCloseable {
private final HTTP2Client client;
private final SslContextFactory.Client sslContextFactory;
private final int port;

public Http2TestClient(boolean secure) throws Exception {
public Http2TestClient(boolean secure, int port) throws Exception {
client = new HTTP2Client();
if (secure) {
sslContextFactory = new SslContextFactory.Client(true);
Expand All @@ -60,6 +61,7 @@ public Http2TestClient(boolean secure) throws Exception {
sslContextFactory = null;
}
client.start();
this.port = port;
}

public static class ClientResponse {
Expand Down Expand Up @@ -140,7 +142,7 @@ public ClientResponse request(final String address, final String path,

final HttpFields.Mutable requestFields = HttpFields.build();
requestFields.add(HttpHeader.ACCEPT, accept);
requestFields.add(HttpHeader.HOST, "localhost");
requestFields.add(HttpHeader.HOST, "localhost:" + port);

final MetaData.Request request = new MetaData.Request(method, HttpURI.build(address + path),
version, requestFields);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,9 @@ protected String getAddress() {
protected String getContext() {
return "/http2";
}

@Override
protected int getPort() {
return Integer.valueOf(PORT);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,9 @@ protected String getAddress() {
protected String getContext() {
return "/http2";
}

@Override
protected int getPort() {
return Integer.valueOf(PORT);
}
}
Loading