Skip to content

Commit 1c7d3a2

Browse files
committed
Remove that tests, which is covered by other test in that class and are predictable
1 parent 904b222 commit 1c7d3a2

File tree

2 files changed

+1
-43
lines changed

2 files changed

+1
-43
lines changed

src/test/java/com/ning/http/client/async/AsyncProvidersBasicTest.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1182,6 +1182,7 @@ public void onThrowable(Throwable t) {
11821182

11831183
try {
11841184
response.getResponseBody();
1185+
11851186
fail();
11861187
} catch (IllegalStateException e) {
11871188
assertNotNull(e.getMessage());

src/test/java/com/ning/http/client/async/ConnectionPoolTest.java

Lines changed: 0 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -286,49 +286,6 @@ public void multipleMaxConnectionOpenTestWithQuery() throws Throwable {
286286
c.close();
287287
}
288288

289-
@Test(groups = {"default_provider", "async"})
290-
public void asyncDoGetMaxConnectionsTest() throws Throwable {
291-
AsyncHttpClient client = new AsyncHttpClient(new AsyncHttpClientConfig.Builder().setMaximumConnectionsTotal(2).build());
292-
293-
// Use a l in case the assert fail
294-
final CountDownLatch l = new CountDownLatch(2);
295-
296-
AsyncCompletionHandler<Response> handler = new AsyncCompletionHandlerAdapter() {
297-
298-
@Override
299-
public Response onCompleted(Response response) throws Exception {
300-
l.countDown();
301-
return response;
302-
}
303-
304-
@Override
305-
public void onThrowable(Throwable t) {
306-
try {
307-
Assert.fail("Unexpected exception", t);
308-
} finally {
309-
l.countDown();
310-
}
311-
}
312-
};
313-
314-
client.prepareGet(getTargetUrl()).execute(handler);
315-
client.prepareGet(getTargetUrl()).execute(handler);
316-
317-
try {
318-
client.prepareGet(getTargetUrl()).execute(handler).get();
319-
Assert.fail();
320-
} catch (IOException ex) {
321-
String s = ex.getMessage();
322-
assertEquals(s, "Too many connections 2");
323-
}
324-
325-
326-
if (!l.await(TIMEOUT, TimeUnit.SECONDS)) {
327-
Assert.fail("Timed out");
328-
}
329-
client.close();
330-
}
331-
332289
/**
333290
* This test just make sure the hack used to catch disconnected channel under win7 doesn't throw any exception.
334291
* The onComplete method must be only called once.

0 commit comments

Comments
 (0)