BAEL-2454 Add missing disconnect call on open connections

This commit is contained in:
Fabian Rivera 2018-12-24 17:46:12 -06:00
parent cdaf0b46bf
commit 48c0b83978
1 changed files with 4 additions and 0 deletions

View File

@ -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>"));