diff --git a/jetty-http2/http2-client/src/test/java/org/eclipse/jetty/http2/client/AbstractTest.java b/jetty-http2/http2-client/src/test/java/org/eclipse/jetty/http2/client/AbstractTest.java index 54b7ce48cba..ac48a66db52 100644 --- a/jetty-http2/http2-client/src/test/java/org/eclipse/jetty/http2/client/AbstractTest.java +++ b/jetty-http2/http2-client/src/test/java/org/eclipse/jetty/http2/client/AbstractTest.java @@ -24,9 +24,10 @@ import javax.servlet.http.HttpServlet; import org.eclipse.jetty.http.HttpFields; import org.eclipse.jetty.http.HttpScheme; +import org.eclipse.jetty.http.HttpVersion; +import org.eclipse.jetty.http.MetaData; import org.eclipse.jetty.http2.api.Session; import org.eclipse.jetty.http2.api.server.ServerSessionListener; -import org.eclipse.jetty.http2.hpack.MetaData; import org.eclipse.jetty.http2.server.HTTP2ServerConnectionFactory; import org.eclipse.jetty.http2.server.RawHTTP2ServerConnectionFactory; import org.eclipse.jetty.server.ConnectionFactory; @@ -105,6 +106,6 @@ public class AbstractTest String host = "localhost"; int port = connector.getLocalPort(); String authority = host + ":" + port; - return new MetaData.Request(HttpScheme.HTTP, method, authority, host, port, path, fields); + return new MetaData.Request(HttpVersion.HTTP_2, HttpScheme.HTTP, method, authority, host, port, path, fields); } } diff --git a/jetty-http2/http2-client/src/test/java/org/eclipse/jetty/http2/client/FlowControlTest.java b/jetty-http2/http2-client/src/test/java/org/eclipse/jetty/http2/client/FlowControlTest.java index 5f34b0cf76e..5d02bad399c 100644 --- a/jetty-http2/http2-client/src/test/java/org/eclipse/jetty/http2/client/FlowControlTest.java +++ b/jetty-http2/http2-client/src/test/java/org/eclipse/jetty/http2/client/FlowControlTest.java @@ -30,13 +30,14 @@ import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.atomic.AtomicReference; import org.eclipse.jetty.http.HttpFields; +import org.eclipse.jetty.http.HttpVersion; +import org.eclipse.jetty.http.MetaData; import org.eclipse.jetty.http2.api.Session; import org.eclipse.jetty.http2.api.Stream; import org.eclipse.jetty.http2.api.server.ServerSessionListener; import org.eclipse.jetty.http2.frames.DataFrame; import org.eclipse.jetty.http2.frames.HeadersFrame; import org.eclipse.jetty.http2.frames.SettingsFrame; -import org.eclipse.jetty.http2.hpack.MetaData; import org.eclipse.jetty.util.Callback; import org.eclipse.jetty.util.FuturePromise; import org.eclipse.jetty.util.Promise; @@ -71,7 +72,7 @@ public class FlowControlTest extends AbstractTest public Stream.Listener onNewStream(Stream stream, HeadersFrame requestFrame) { HttpFields fields = new HttpFields(); - MetaData.Response response = new MetaData.Response(200, fields); + MetaData.Response response = new MetaData.Response(HttpVersion.HTTP_2, 200, fields); HeadersFrame responseFrame = new HeadersFrame(stream.getId(), response, null, true); stream.headers(responseFrame, Callback.Adapter.INSTANCE); @@ -149,7 +150,7 @@ public class FlowControlTest extends AbstractTest @Override public Stream.Listener onNewStream(Stream stream, HeadersFrame requestFrame) { - MetaData.Response metaData = new MetaData.Response(200, new HttpFields()); + MetaData.Response metaData = new MetaData.Response(HttpVersion.HTTP_2, 200, new HttpFields()); HeadersFrame responseFrame = new HeadersFrame(stream.getId(), metaData, null, false); stream.headers(responseFrame, Callback.Adapter.INSTANCE); @@ -241,7 +242,7 @@ public class FlowControlTest extends AbstractTest @Override public Stream.Listener onNewStream(Stream stream, HeadersFrame requestFrame) { - MetaData.Response metaData = new MetaData.Response(200, new HttpFields()); + MetaData.Response metaData = new MetaData.Response(HttpVersion.HTTP_2, 200, new HttpFields()); HeadersFrame responseFrame = new HeadersFrame(stream.getId(), metaData, null, false); stream.headers(responseFrame, Callback.Adapter.INSTANCE); return new Stream.Listener.Adapter() @@ -346,7 +347,7 @@ public class FlowControlTest extends AbstractTest public Stream.Listener onNewStream(Stream stream, HeadersFrame requestFrame) { // For every stream, send down half the window size of data. - MetaData.Response metaData = new MetaData.Response(200, new HttpFields()); + MetaData.Response metaData = new MetaData.Response(HttpVersion.HTTP_2, 200, new HttpFields()); HeadersFrame responseFrame = new HeadersFrame(stream.getId(), metaData, null, false); stream.headers(responseFrame, Callback.Adapter.INSTANCE); DataFrame dataFrame = new DataFrame(stream.getId(), ByteBuffer.allocate(windowSize / 2), true); @@ -428,7 +429,7 @@ public class FlowControlTest extends AbstractTest @Override public Stream.Listener onNewStream(Stream stream, HeadersFrame requestFrame) { - MetaData.Response metaData = new MetaData.Response(200, new HttpFields()); + MetaData.Response metaData = new MetaData.Response(HttpVersion.HTTP_2, 200, new HttpFields()); HeadersFrame responseFrame = new HeadersFrame(stream.getId(), metaData, null, false); stream.headers(responseFrame, Callback.Adapter.INSTANCE); DataFrame dataFrame = new DataFrame(stream.getId(), ByteBuffer.wrap(data), true); diff --git a/jetty-http2/http2-client/src/test/java/org/eclipse/jetty/http2/client/HTTP2Test.java b/jetty-http2/http2-client/src/test/java/org/eclipse/jetty/http2/client/HTTP2Test.java index 4e7e91d5254..e68bbf00c02 100644 --- a/jetty-http2/http2-client/src/test/java/org/eclipse/jetty/http2/client/HTTP2Test.java +++ b/jetty-http2/http2-client/src/test/java/org/eclipse/jetty/http2/client/HTTP2Test.java @@ -29,11 +29,11 @@ import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.eclipse.jetty.http.HttpFields; +import org.eclipse.jetty.http.MetaData; import org.eclipse.jetty.http2.api.Session; import org.eclipse.jetty.http2.api.Stream; import org.eclipse.jetty.http2.frames.DataFrame; import org.eclipse.jetty.http2.frames.HeadersFrame; -import org.eclipse.jetty.http2.hpack.MetaData; import org.eclipse.jetty.util.Callback; import org.eclipse.jetty.util.Promise; import org.junit.Assert;