Details
-
Type:
Bug
-
Status: Open
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: 1.0.0
-
Fix Version/s: None
-
Component/s: Morphlines Module
-
Labels:None
Description
The HttpMetricsMorphlineTest will fail because an unexpected SocketException is thrown.
The assumption that URLConnection.getInputStream() only throws ConnectionException is a little bit optimistic. The signature of getInputStream states that it may throw the generic IOException. It may differ between OS what the actual IOException derivative that will be thrown. It is true that on most OSes ConnectionException will be rendered but at some like OSX a SocketException will be thrown instead.
Running org.kitesdk.morphline.metrics.servlets.HttpMetricsMorphlineTest
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 1.656 sec <<< FAILURE!
testBasic(org.kitesdk.morphline.metrics.servlets.HttpMetricsMorphlineTest) Time elapsed: 1.611 sec <<< ERROR!
java.net.SocketException: Unexpected end of file from server
at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:772)
at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:633)
at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:769)
at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:633)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1324)
at org.kitesdk.morphline.metrics.servlets.HttpMetricsMorphlineTest.httpGet(HttpMetricsMorphlineTest.java:103)
at org.kitesdk.morphline.metrics.servlets.HttpMetricsMorphlineTest.verifyShutdown(HttpMetricsMorphlineTest.java:92)
at org.kitesdk.morphline.metrics.servlets.HttpMetricsMorphlineTest.testBasic(HttpMetricsMorphlineTest.java:56)