Uploaded image for project: 'Kite SDK (READ-ONLY)'
  1. Kite SDK (READ-ONLY)
  2. KITE-989

HttpMetricsMorphlineTest assumes that only ConnectionException may be thrown

    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)

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              chelin Charlie Helin
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: