누군가이 httpunit 테스트 사례가 "잘못된 파일 설명자"가있는 wc.getResponse에서 계속 실패하는 이유를 설명해 줄 수 있습니까? 추측으로 is.close()를 추가하고 실패 전후로 이동했지만 아무런 효과가 없었습니다. 이 테스트는 Dropwizard 앱에 요청을 보냅니다.httpunit PutMethodWebRequest가 IOException을 throw합니다. 잘못된 파일 설명자
public class TestCircuitRequests
{
static WebConversation wc = new WebConversation();
static String url = "http://localhost:8888/funl/circuit/test.circuit1";
@Test
public void testPut() throws Exception
{
InputStream is = new FileInputStream("src/test/resources/TestCircuit.json");
WebRequest rq = new PutMethodWebRequest(url, is, "application/json");
wc.setAuthentication("FUNL", "foo", "bar");
WebResponse response = wc.getResponse(rq);
is.close();
}
그리고이 컨텍스트에서 "잘못된 파일 설명자"는 무엇을 의미합니까? – Bradjcox
httpunit 개발자 FAQ 을 확인하여 1.7.2 릴리스가 작동하는지 확인하는 것이 좋습니다. rev1099를 확인하십시오 https://sourceforge.net/mailarchive/forum.php?thread_name=5051BBF6.70700%40bitplan.com&forum_name=httpunit-develop –