Add missing disconnect call on open connections
@@ -160,6 +160,8 @@ public class HttpRequestLiveTest {
}
in.close();
+ con.disconnect();
+
assertEquals("status code incorrect", status, 411);
assertTrue("error content", content.toString()
.contains("411 - Length Required"));
@@ -176,6 +178,8 @@ public class HttpRequestLiveTest {
String fullResponse = FullResponseBuilder.getFullResponse(con);
+ con.disconnect();
+
assertEquals("status code incorrect", con.getResponseCode(), 200);
assertTrue("header incorrect", fullResponse.contains("Content-Type: text/html; charset=UTF-8"));
assertTrue("response incorrect", fullResponse.contains("<!doctype html><html><head>"));
