Skip to content

Commit 8c1779a

Browse files
committed
- Fix redirect test.
- Update Grizzly provider to default back to the WorkerThreadIOStrategy.
1 parent c74191e commit 8c1779a

File tree

3 files changed

+2
-15
lines changed

3 files changed

+2
-15
lines changed

api/src/test/java/org/asynchttpclient/async/AsyncProvidersBasicTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1358,7 +1358,7 @@ public void onThrowable(Throwable t) {
13581358
}
13591359
};
13601360

1361-
client.prepareGet("http://www.google.com").execute(handler);
1361+
client.prepareGet("http://google.com/").execute(handler);
13621362

13631363
if (!l.await(TIMEOUT, TimeUnit.SECONDS)) {
13641364
fail("Timed out");

providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/GrizzlyAsyncHttpProvider.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@
6565
import org.glassfish.grizzly.nio.transport.TCPNIOTransportBuilder;
6666
import org.glassfish.grizzly.ssl.SSLEngineConfigurator;
6767
import org.glassfish.grizzly.ssl.SSLFilter;
68-
import org.glassfish.grizzly.strategies.SameThreadIOStrategy;
6968
import org.glassfish.grizzly.strategies.WorkerThreadIOStrategy;
7069
import org.glassfish.grizzly.utils.DelayedExecutor;
7170
import org.glassfish.grizzly.utils.IdleTimeoutFilter;
@@ -466,11 +465,9 @@ private FilterChainBuilder createSpdyFilterChain(final FilterChainBuilder fcb,
466465

467466
private void doDefaultTransportConfig() {
468467
final ExecutorService service = clientConfig.executorService();
468+
clientTransport.setIOStrategy(WorkerThreadIOStrategy.getInstance());
469469
if (service != null) {
470-
clientTransport.setIOStrategy(WorkerThreadIOStrategy.getInstance());
471470
clientTransport.setWorkerThreadPool(service);
472-
} else {
473-
clientTransport.setIOStrategy(SameThreadIOStrategy.getInstance());
474471
}
475472
}
476473

providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlyAsyncProviderBasicTest.java

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -36,17 +36,7 @@ public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) {
3636
@Override
3737
protected AsyncHttpProviderConfig<?, ?> getProviderConfig() {
3838
final GrizzlyAsyncHttpProviderConfig config = new GrizzlyAsyncHttpProviderConfig();
39-
config.addProperty(TRANSPORT_CUSTOMIZER, new TransportCustomizer() {
40-
@Override
41-
public void customize(TCPNIOTransport transport, FilterChainBuilder builder) {
42-
transport.setTcpNoDelay(true);
43-
transport.setIOStrategy(SameThreadIOStrategy.getInstance());
44-
}
45-
});
4639
return config;
4740
}
4841

49-
@Test(groups = { "standalone", "default_provider", "async" }, enabled = false)
50-
public void asyncDoPostBasicGZIPTest() throws Exception {
51-
}
5242
}

0 commit comments

Comments
 (0)