diff --git a/vertx-core/src/test/java/io/vertx/test/http/AbstractHttpTest2.java b/vertx-core/src/test/java/io/vertx/test/http/AbstractHttpTest2.java index 350a491b3fd..0fd2e15287c 100644 --- a/vertx-core/src/test/java/io/vertx/test/http/AbstractHttpTest2.java +++ b/vertx-core/src/test/java/io/vertx/test/http/AbstractHttpTest2.java @@ -11,19 +11,19 @@ package io.vertx.test.http; -import io.vertx.core.Context; -import io.vertx.core.Future; -import io.vertx.core.Vertx; -import io.vertx.core.VertxOptions; +import io.vertx.core.*; import io.vertx.core.dns.AddressResolverOptions; import io.vertx.core.http.*; import io.vertx.core.net.SocketAddress; +import io.vertx.core.transport.Transport; import io.vertx.test.core.ProvidedBy; import io.vertx.test.core.VertxProvider; import io.vertx.test.core.VertxRunner; import io.vertx.test.core.VertxTestBase; import io.vertx.test.fakedns.DnsServer; +import junit.framework.AssertionFailedError; import org.junit.After; +import org.junit.Assert; import org.junit.Before; import org.junit.Rule; import org.junit.runner.RunWith; @@ -39,6 +39,8 @@ import java.util.concurrent.ExecutionException; import java.util.concurrent.TimeUnit; +import static io.vertx.test.core.VertxTestBase.TRANSPORT; + /** * @author Tim Fox * @author Nick Scavelli @@ -189,7 +191,23 @@ public Vertx call() { .setAddressResolverOptions(new AddressResolverOptions() .addServer("127.0.0.1:" + dnsServer.port())); } - return Vertx.vertx(options); + Transport transport = TRANSPORT; + VertxBuilder builder = Vertx.builder(); + builder.with(options); + builder.withTransport(transport); + Vertx vertx = builder.build(); + if (!transport.name().equals("nio")) { + if (!vertx.isNativeTransportEnabled()) { + AssertionFailedError afe = new AssertionFailedError("Expected native transport"); + Throwable cause = vertx.unavailableNativeTransportCause(); + if (cause != null) { + afe.initCause(cause); + } + throw afe; + } + Assert.assertTrue(vertx.isNativeTransportEnabled()); + } + return vertx; } } } diff --git a/vertx-core/src/test/java/io/vertx/tests/http/Http2ClientTest.java b/vertx-core/src/test/java/io/vertx/tests/http/Http2ClientTest.java index bb7a54f0c85..3dc748304ae 100644 --- a/vertx-core/src/test/java/io/vertx/tests/http/Http2ClientTest.java +++ b/vertx-core/src/test/java/io/vertx/tests/http/Http2ClientTest.java @@ -614,11 +614,13 @@ public void testClientResponsePauseResume() throws Exception { await(); } + @Ignore("To be updated due to changes in Netty 4.2.14") @Test public void testQueueingRequests() throws Exception { testQueueingRequests(100, null); } + @Ignore("To be updated due to changes in Netty 4.2.14") @Test public void testQueueingRequestsMaxConcurrentStream() throws Exception { testQueueingRequests(100, 10L);