Skip to content

Commit 1727ef4

Browse files
author
Stephane Landelle
committed
Rename connectionTimeout into connectTimeout, close AsyncHttpClient#704
1 parent 93df8cc commit 1727ef4

25 files changed

+57
-61
lines changed

api/src/main/java/org/asynchttpclient/AsyncHttpClient.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@
123123
* Response r = f.get();
124124
* </pre></blockquote>
125125
* <p/>
126-
* An instance of this class will cache every HTTP 1.1 connections and close them when the {@link AsyncHttpClientConfig#getIdleConnectionTimeoutInMs()}
126+
* An instance of this class will cache every HTTP 1.1 connections and close them when the {@link AsyncHttpClientConfig#getReadTimeout()}
127127
* expires. This object can hold many persistent connections to different host.
128128
*/
129129
public interface AsyncHttpClient extends Closeable {

api/src/main/java/org/asynchttpclient/AsyncHttpClientConfig.java

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ public class AsyncHttpClientConfig {
6767
AHC_VERSION = prop.getProperty("ahc.version", "UNKNOWN");
6868
}
6969

70-
protected int connectionTimeout;
70+
protected int connectTimeout;
7171

7272
protected int maxConnections;
7373
protected int maxConnectionsPerHost;
@@ -114,7 +114,7 @@ public class AsyncHttpClientConfig {
114114
protected AsyncHttpClientConfig() {
115115
}
116116

117-
private AsyncHttpClientConfig(int connectionTimeout,//
117+
private AsyncHttpClientConfig(int connectTimeout,//
118118
int maxConnections,//
119119
int maxConnectionsPerHost,//
120120
int requestTimeout,//
@@ -149,7 +149,7 @@ private AsyncHttpClientConfig(int connectionTimeout,//
149149
int spdyInitialWindowSize, //
150150
int spdyMaxConcurrentStreams) {
151151

152-
this.connectionTimeout = connectionTimeout;
152+
this.connectTimeout = connectTimeout;
153153
this.maxConnections = maxConnections;
154154
this.maxConnectionsPerHost = maxConnectionsPerHost;
155155
this.requestTimeout = requestTimeout;
@@ -209,8 +209,8 @@ public int getMaxConnectionsPerHost() {
209209
*
210210
* @return the maximum time in millisecond an {@link AsyncHttpClient} can wait when connecting to a remote host
211211
*/
212-
public int getConnectionTimeout() {
213-
return connectionTimeout;
212+
public int getConnectTimeout() {
213+
return connectTimeout;
214214
}
215215

216216
/**
@@ -528,7 +528,7 @@ public boolean isAcceptAnyCertificate() {
528528
* Builder for an {@link AsyncHttpClient}
529529
*/
530530
public static class Builder {
531-
private int connectionTimeout = defaultConnectionTimeout();
531+
private int connectTimeout = defaultConnectTimeout();
532532
private int maxConnections = defaultMaxConnections();
533533
private int maxConnectionsPerHost = defaultMaxConnectionsPerHost();
534534
private int requestTimeout = defaultRequestTimeout();
@@ -595,11 +595,11 @@ public Builder setMaxConnectionsPerHost(int maxConnectionsPerHost) {
595595
/**
596596
* Set the maximum time in millisecond an {@link AsyncHttpClient} can wait when connecting to a remote host
597597
*
598-
* @param connectionTimeout the maximum time in millisecond an {@link AsyncHttpClient} can wait when connecting to a remote host
598+
* @param connectTimeout the maximum time in millisecond an {@link AsyncHttpClient} can wait when connecting to a remote host
599599
* @return a {@link Builder}
600600
*/
601-
public Builder setConnectionTimeout(int connectionTimeout) {
602-
this.connectionTimeout = connectionTimeout;
601+
public Builder setConnectTimeout(int connectTimeout) {
602+
this.connectTimeout = connectTimeout;
603603
return this;
604604
}
605605

@@ -1037,7 +1037,7 @@ public Builder setAcceptAnyCertificate(boolean acceptAnyCertificate) {
10371037
public Builder(AsyncHttpClientConfig prototype) {
10381038
allowPoolingConnections = prototype.isAllowPoolingConnections();
10391039
providerConfig = prototype.getAsyncHttpProviderConfig();
1040-
connectionTimeout = prototype.getConnectionTimeout();
1040+
connectTimeout = prototype.getConnectTimeout();
10411041
pooledConnectionIdleTimeout = prototype.getPooledConnectionIdleTimeout();
10421042
readTimeout = prototype.getReadTimeout();
10431043
maxConnectionsPerHost = prototype.getMaxConnectionsPerHost();
@@ -1097,7 +1097,7 @@ public AsyncHttpClientConfig build() {
10971097
else if (hostnameVerifier == null)
10981098
hostnameVerifier = new DefaultHostnameVerifier();
10991099

1100-
return new AsyncHttpClientConfig(connectionTimeout,//
1100+
return new AsyncHttpClientConfig(connectTimeout,//
11011101
maxConnections,//
11021102
maxConnectionsPerHost,//
11031103
requestTimeout,//

api/src/main/java/org/asynchttpclient/AsyncHttpClientConfigBean.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ void configureFilters() {
4747
void configureDefaults() {
4848
maxConnections = defaultMaxConnections();
4949
maxConnectionsPerHost = defaultMaxConnectionsPerHost();
50-
connectionTimeout = defaultConnectionTimeout();
50+
connectTimeout = defaultConnectTimeout();
5151
webSocketTimeout = defaultWebSocketTimeout();
5252
pooledConnectionIdleTimeout = defaultPooledConnectionIdleTimeout();
5353
readTimeout = defaultReadTimeout();
@@ -98,8 +98,8 @@ public AsyncHttpClientConfigBean setMaxConnectionsPerHost(int maxConnectionsPerH
9898
return this;
9999
}
100100

101-
public AsyncHttpClientConfigBean setConnectionTimeout(int connectionTimeout) {
102-
this.connectionTimeout = connectionTimeout;
101+
public AsyncHttpClientConfigBean setConnectTimeout(int connectTimeout) {
102+
this.connectTimeout = connectTimeout;
103103
return this;
104104
}
105105

api/src/main/java/org/asynchttpclient/AsyncHttpClientConfigDefaults.java

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,6 @@
1313
package org.asynchttpclient;
1414

1515
import org.asynchttpclient.util.AsyncPropertiesHelper;
16-
import org.asynchttpclient.util.DefaultHostnameVerifier;
17-
18-
import javax.net.ssl.HostnameVerifier;
1916

2017
public final class AsyncHttpClientConfigDefaults {
2118

@@ -32,8 +29,8 @@ public static int defaultMaxConnectionsPerHost() {
3229
return AsyncPropertiesHelper.getAsyncHttpClientConfig().getInt(ASYNC_CLIENT + "maxConnectionsPerHost");
3330
}
3431

35-
public static int defaultConnectionTimeout() {
36-
return AsyncPropertiesHelper.getAsyncHttpClientConfig().getInt(ASYNC_CLIENT + "connectionTimeout");
32+
public static int defaultConnectTimeout() {
33+
return AsyncPropertiesHelper.getAsyncHttpClientConfig().getInt(ASYNC_CLIENT + "connectTimeout");
3734
}
3835

3936
public static int defaultPooledConnectionIdleTimeout() {

api/src/main/java/org/asynchttpclient/SimpleAsyncHttpClient.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -508,8 +508,8 @@ public Builder setMaxConnectionsPerHost(int defaultMaxConnectionsPerHost) {
508508
return this;
509509
}
510510

511-
public Builder setConnectionTimeout(int connectionTimeuot) {
512-
configBuilder.setConnectionTimeout(connectionTimeuot);
511+
public Builder setConnectTimeout(int connectTimeuot) {
512+
configBuilder.setConnectTimeout(connectTimeuot);
513513
return this;
514514
}
515515

api/src/main/resources/ahc-default.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
org.asynchttpclient.AsyncHttpClientConfig.maxConnections=-1
22
org.asynchttpclient.AsyncHttpClientConfig.maxConnectionsPerHost=-1
3-
org.asynchttpclient.AsyncHttpClientConfig.connectionTimeout=60000
3+
org.asynchttpclient.AsyncHttpClientConfig.connectTimeout=5000
44
org.asynchttpclient.AsyncHttpClientConfig.pooledConnectionIdleTimeout=60000
55
org.asynchttpclient.AsyncHttpClientConfig.readTimeout=60000
66
org.asynchttpclient.AsyncHttpClientConfig.requestTimeout=60000

api/src/test/java/org/asynchttpclient/AsyncHttpClientDefaultsTest.java

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,32 +20,32 @@ public void testDefaultMaxConnectionPerHost() {
2020
testIntegerSystemProperty("maxConnectionsPerHost", "defaultMaxConnectionsPerHost", "100");
2121
}
2222

23-
public void testDefaultConnectionTimeOutInMs() {
24-
Assert.assertEquals(AsyncHttpClientConfigDefaults.defaultConnectionTimeout(), 60 * 1000);
25-
testIntegerSystemProperty("connectionTimeout", "defaultConnectionTimeout", "100");
23+
public void testDefaultConnectTimeOut() {
24+
Assert.assertEquals(AsyncHttpClientConfigDefaults.defaultConnectTimeout(), 60 * 1000);
25+
testIntegerSystemProperty("connectTimeout", "defaultConnectTimeout", "100");
2626
}
2727

28-
public void testDefaultIdleConnectionInPoolTimeoutInMs() {
28+
public void testDefaultPooledConnectionIdleTimeout() {
2929
Assert.assertEquals(AsyncHttpClientConfigDefaults.defaultPooledConnectionIdleTimeout(), 60 * 1000);
3030
testIntegerSystemProperty("pooledConnectionIdleTimeout", "defaultPooledConnectionIdleTimeout", "100");
3131
}
3232

33-
public void testDefaultIdleConnectionTimeoutInMs() {
33+
public void testDefaultReadTimeout() {
3434
Assert.assertEquals(AsyncHttpClientConfigDefaults.defaultReadTimeout(), 60 * 1000);
3535
testIntegerSystemProperty("readTimeout", "defaultReadTimeout", "100");
3636
}
3737

38-
public void testDefaultRequestTimeoutInMs() {
38+
public void testDefaultRequestTimeout() {
3939
Assert.assertEquals(AsyncHttpClientConfigDefaults.defaultRequestTimeout(), 60 * 1000);
4040
testIntegerSystemProperty("requestTimeout", "defaultRequestTimeout", "100");
4141
}
4242

43-
public void testDefaultWebSocketIdleTimeoutInMs() {
43+
public void testDefaultWebSocketTimeout() {
4444
Assert.assertEquals(AsyncHttpClientConfigDefaults.defaultWebSocketTimeout(), 15 * 60 * 1000);
4545
testIntegerSystemProperty("webSocketTimeout", "defaultWebSocketTimeout", "100");
4646
}
4747

48-
public void testDefaultMaxConnectionLifeTimeInMs() {
48+
public void testDefaultConnectionTTL() {
4949
Assert.assertEquals(AsyncHttpClientConfigDefaults.defaultConnectionTTL(), -1);
5050
testIntegerSystemProperty("connectionTTL", "defaultConnectionTTL", "100");
5151
}
@@ -105,7 +105,7 @@ public void testDefaultMaxRequestRetry() {
105105
testIntegerSystemProperty("maxRequestRetry", "defaultMaxRequestRetry", "100");
106106
}
107107

108-
public void testDefaultAllowSslConnectionPool() {
108+
public void testDefaultAllowPoolingSslConnections() {
109109
Assert.assertTrue(AsyncHttpClientConfigDefaults.defaultAllowPoolingSslConnections());
110110
testBooleanSystemProperty("allowPoolingSslConnections", "defaultAllowPoolingSslConnections", "false");
111111
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ protected void inspectException(Throwable t) {
211211
}
212212

213213
private AsyncHttpClient newClient() {
214-
return getAsyncHttpClient(new AsyncHttpClientConfig.Builder().setPooledConnectionIdleTimeout(2000).setConnectionTimeout(20000).setRequestTimeout(2000).build());
214+
return getAsyncHttpClient(new AsyncHttpClientConfig.Builder().setPooledConnectionIdleTimeout(2000).setConnectTimeout(20000).setRequestTimeout(2000).build());
215215
}
216216

217217
protected Future<Response> execute(AsyncHttpClient client, Server server, boolean preemptive) throws IOException {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public abstract class BodyChunkTest extends AbstractBasicTest {
3535
public void negativeContentTypeTest() throws Exception {
3636

3737
AsyncHttpClientConfig.Builder confbuilder = new AsyncHttpClientConfig.Builder();
38-
confbuilder = confbuilder.setConnectionTimeout(100);
38+
confbuilder = confbuilder.setConnectTimeout(100);
3939
confbuilder = confbuilder.setMaxConnections(50);
4040
confbuilder = confbuilder.setRequestTimeout(5 * 60 * 1000); // 5 minutes
4141

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public void testCustomChunking() throws Exception {
4848
bc.setAllowPoolingConnections(true);
4949
bc.setMaxConnectionsPerHost(1);
5050
bc.setMaxConnections(1);
51-
bc.setConnectionTimeout(1000);
51+
bc.setConnectTimeout(1000);
5252
bc.setRequestTimeout(1000);
5353
bc.setFollowRedirect(true);
5454

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ public Response onCompleted(Response response) throws Exception {
132132

133133
@Test(groups = { "standalone", "default_provider" })
134134
public void multipleMaxConnectionOpenTest() throws Exception {
135-
AsyncHttpClientConfig cg = new AsyncHttpClientConfig.Builder().setAllowPoolingConnections(true).setConnectionTimeout(5000).setMaxConnections(1).build();
135+
AsyncHttpClientConfig cg = new AsyncHttpClientConfig.Builder().setAllowPoolingConnections(true).setConnectTimeout(5000).setMaxConnections(1).build();
136136
AsyncHttpClient c = getAsyncHttpClient(cg);
137137
try {
138138
String body = "hello there";
@@ -160,7 +160,7 @@ public void multipleMaxConnectionOpenTest() throws Exception {
160160

161161
@Test(groups = { "standalone", "default_provider" })
162162
public void multipleMaxConnectionOpenTestWithQuery() throws Exception {
163-
AsyncHttpClientConfig cg = new AsyncHttpClientConfig.Builder().setAllowPoolingConnections(true).setConnectionTimeout(5000).setMaxConnections(1).build();
163+
AsyncHttpClientConfig cg = new AsyncHttpClientConfig.Builder().setAllowPoolingConnections(true).setConnectTimeout(5000).setMaxConnections(1).build();
164164
AsyncHttpClient c = getAsyncHttpClient(cg);
165165
try {
166166
String body = "hello there";

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ public void testMaxConnectionsWithinThreads() {
5151

5252
String[] urls = new String[] { servletEndpointUri.toString(), servletEndpointUri.toString() };
5353

54-
final AsyncHttpClient client = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().setConnectionTimeout(1000).setRequestTimeout(5000)
54+
final AsyncHttpClient client = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().setConnectTimeout(1000).setRequestTimeout(5000)
5555
.setAllowPoolingConnections(true).setMaxConnections(1).setMaxConnectionsPerHost(1).build());
5656

5757
try {

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public abstract class MaxTotalConnectionTest extends AbstractBasicTest {
3939
public void testMaxTotalConnectionsExceedingException() {
4040
String[] urls = new String[] { "http://google.com", "http://github.com/" };
4141

42-
AsyncHttpClient client = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().setConnectionTimeout(1000).setRequestTimeout(5000).setAllowPoolingConnections(false).setMaxConnections(1).setMaxConnectionsPerHost(1).build());
42+
AsyncHttpClient client = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().setConnectTimeout(1000).setRequestTimeout(5000).setAllowPoolingConnections(false).setMaxConnections(1).setMaxConnectionsPerHost(1).build());
4343
try {
4444
boolean caughtError = false;
4545
for (int i = 0; i < urls.length; i++) {
@@ -61,7 +61,7 @@ public void testMaxTotalConnectionsExceedingException() {
6161
public void testMaxTotalConnections() {
6262
String[] urls = new String[] { "http://google.com", "http://lenta.ru" };
6363

64-
AsyncHttpClient client = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().setConnectionTimeout(1000).setRequestTimeout(5000).setAllowPoolingConnections(false).setMaxConnections(2).setMaxConnectionsPerHost(1).build());
64+
AsyncHttpClient client = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().setConnectTimeout(1000).setRequestTimeout(5000).setAllowPoolingConnections(false).setMaxConnections(2).setMaxConnectionsPerHost(1).build());
6565
try {
6666
for (String url : urls) {
6767
try {
@@ -82,7 +82,7 @@ public void testMaxTotalConnections() {
8282
public void testMaxTotalConnectionsCorrectExceptionHandling() {
8383
String[] urls = new String[] { "http://google.com", "http://github.com/" };
8484

85-
AsyncHttpClient client = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().setConnectionTimeout(1000).setRequestTimeout(5000).setAllowPoolingConnections(false).setMaxConnections(1).setMaxConnectionsPerHost(1).build());
85+
AsyncHttpClient client = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().setConnectTimeout(1000).setRequestTimeout(5000).setAllowPoolingConnections(false).setMaxConnections(1).setMaxConnectionsPerHost(1).build());
8686
try {
8787
List<Future<Response>> futures = new ArrayList<Future<Response>>();
8888
boolean caughtError = false;

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ public void multipleSslRequestsWithDelayAndKeepAlive() throws Exception {
5656
}
5757

5858
private AsyncHttpClient create() throws GeneralSecurityException {
59-
final AsyncHttpClientConfig.Builder configBuilder = new AsyncHttpClientConfig.Builder().setFollowRedirect(true).setSSLContext(getSSLContext()).setAllowPoolingConnections(true).setConnectionTimeout(10000)
59+
final AsyncHttpClientConfig.Builder configBuilder = new AsyncHttpClientConfig.Builder().setFollowRedirect(true).setSSLContext(getSSLContext()).setAllowPoolingConnections(true).setConnectTimeout(10000)
6060
.setPooledConnectionIdleTimeout(60000).setRequestTimeout(10000).setMaxConnectionsPerHost(-1).setMaxConnections(-1);
6161
return getAsyncHttpClient(configBuilder.build());
6262
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public void testPutLargeFile() throws Exception {
4141

4242
int timeout = (int) file.length() / 1000;
4343

44-
AsyncHttpClient client = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().setConnectionTimeout(timeout).build());
44+
AsyncHttpClient client = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().setConnectTimeout(timeout).build());
4545
try {
4646
Response response = client.preparePut(getTargetUrl()).setBody(file).execute().get();
4747
assertEquals(response.getStatusCode(), 200);

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ public void testGetRedirectFinalUrl() throws Exception {
7777
.setAllowPoolingConnections(true)//
7878
.setMaxConnectionsPerHost(1)//
7979
.setMaxConnections(1)//
80-
.setConnectionTimeout(1000)//
80+
.setConnectTimeout(1000)//
8181
.setRequestTimeout(1000)//
8282
.setFollowRedirect(true)//
8383
.build();

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ public void basicPutFileTest() throws Exception {
147147
File file = createTempFile(1024 * 100 * 10);
148148

149149
int timeout = (int) (file.length() / 1000);
150-
AsyncHttpClient client = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().setConnectionTimeout(timeout).build());
150+
AsyncHttpClient client = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().setConnectTimeout(timeout).build());
151151

152152
try {
153153
TransferCompletionHandler tl = new TransferCompletionHandler();

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ public class ConnectionManager {
7777
this.connectionPool = new ConnectionPool(config.getMaxConnectionsPerHost(),//
7878
config.getMaxConnections(),//
7979
null,//
80-
config.getConnectionTimeout(),//
80+
config.getConnectTimeout(),//
8181
config.getPooledConnectionIdleTimeout(),//
8282
2000);
8383
canDestroyPool = true;
@@ -210,7 +210,7 @@ private static int getPort(final Uri uri, final int p) {
210210
private Connection obtainConnection0(final Request request, final GrizzlyResponseFuture requestFuture) throws ExecutionException,
211211
InterruptedException, TimeoutException, IOException {
212212

213-
final int cTimeout = provider.getClientConfig().getConnectionTimeout();
213+
final int cTimeout = provider.getClientConfig().getConnectTimeout();
214214
final FutureImpl<Connection> future = Futures.createSafeFuture();
215215
final CompletionHandler<Connection> ch = Futures.toCompletionHandler(future,
216216
createConnectionCompletionHandler(request, requestFuture, null));

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public void testMaxTotalConnectionsException() {
4040
@Override
4141
@Test
4242
public void multipleMaxConnectionOpenTest() throws Exception {
43-
AsyncHttpClientConfig cg = new AsyncHttpClientConfig.Builder().setAllowPoolingConnections(true).setConnectionTimeout(5000)
43+
AsyncHttpClientConfig cg = new AsyncHttpClientConfig.Builder().setAllowPoolingConnections(true).setConnectTimeout(5000)
4444
.setMaxConnections(1).build();
4545
AsyncHttpClient c = getAsyncHttpClient(cg);
4646
try {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ public void testNoTransferEncoding() throws Exception {
8686

8787
AsyncHttpClientConfig config = new AsyncHttpClientConfig.Builder()
8888
.setFollowRedirect(false)
89-
.setConnectionTimeout(15000)
89+
.setConnectTimeout(15000)
9090
.setRequestTimeout(15000)
9191
.setAllowPoolingConnections(false)
9292
.setDisableUrlEncodingForBoundRequests(true)

0 commit comments

Comments
 (0)