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
28 changes: 23 additions & 5 deletions vertx-core/src/test/java/io/vertx/test/http/AbstractHttpTest2.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -39,6 +39,8 @@
import java.util.concurrent.ExecutionException;
import java.util.concurrent.TimeUnit;

import static io.vertx.test.core.VertxTestBase.TRANSPORT;

/**
* @author <a href="http://tfox.org">Tim Fox</a>
* @author <a href="mailto:nscavell@redhat.com">Nick Scavelli</a>
Expand Down Expand Up @@ -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;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Loading