Uploaded image for project: 'Arquillian'
  1. Arquillian
  2. ARQ-643

Arquillian fails to execute in-container tests when the serverHttps property is enabled for remote Glassfish containers

XMLWordPrintable

    • Hide
      1. Enable the serverHttps property in arquillian.xml.
      2. Run the GlassFishRestDeployWarTest unit test in the Arquillian Glassfish container project.

      The following exception will be thrown:

      6 Nov, 2011 1:45:59 PM org.jboss.arquillian.container.glassfish.remote_3_1.GlassFishRestDeployWarTest getTestArchive
      INFO: test.war:
      /WEB-INF/
      /WEB-INF/beans.xml
      /WEB-INF/classes/
      /WEB-INF/classes/org/
      /WEB-INF/classes/org/jboss/
      /WEB-INF/classes/org/jboss/arquillian/
      /WEB-INF/classes/org/jboss/arquillian/container/
      /WEB-INF/classes/org/jboss/arquillian/container/glassfish/
      /WEB-INF/classes/org/jboss/arquillian/container/glassfish/remote_3_1/
      /WEB-INF/classes/org/jboss/arquillian/container/glassfish/remote_3_1/GreeterServlet.class
      /WEB-INF/classes/org/jboss/arquillian/container/glassfish/remote_3_1/Greeter.class
      java.net.SocketException: Unexpected end of file from server
      	at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:769)
      	at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:632)
      	at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:766)
      	at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:632)
      	at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1195)
      	at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:379)
      	at org.jboss.arquillian.protocol.servlet.ServletMethodExecutor.execute(ServletMethodExecutor.java:202)
      	at org.jboss.arquillian.protocol.servlet.ServletMethodExecutor.access$000(ServletMethodExecutor.java:41)
      	at org.jboss.arquillian.protocol.servlet.ServletMethodExecutor$1.run(ServletMethodExecutor.java:95)
      	at java.util.TimerThread.mainLoop(Timer.java:512)
      	at java.util.TimerThread.run(Timer.java:462)
      
      Show
      Enable the serverHttps property in arquillian.xml. Run the GlassFishRestDeployWarTest unit test in the Arquillian Glassfish container project. The following exception will be thrown: 6 Nov, 2011 1:45:59 PM org.jboss.arquillian.container.glassfish.remote_3_1.GlassFishRestDeployWarTest getTestArchive INFO: test.war: /WEB-INF/ /WEB-INF/beans.xml /WEB-INF/classes/ /WEB-INF/classes/org/ /WEB-INF/classes/org/jboss/ /WEB-INF/classes/org/jboss/arquillian/ /WEB-INF/classes/org/jboss/arquillian/container/ /WEB-INF/classes/org/jboss/arquillian/container/glassfish/ /WEB-INF/classes/org/jboss/arquillian/container/glassfish/remote_3_1/ /WEB-INF/classes/org/jboss/arquillian/container/glassfish/remote_3_1/GreeterServlet.class /WEB-INF/classes/org/jboss/arquillian/container/glassfish/remote_3_1/Greeter. class java.net.SocketException: Unexpected end of file from server at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:769) at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:632) at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:766) at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:632) at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1195) at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:379) at org.jboss.arquillian.protocol.servlet.ServletMethodExecutor.execute(ServletMethodExecutor.java:202) at org.jboss.arquillian.protocol.servlet.ServletMethodExecutor.access$000(ServletMethodExecutor.java:41) at org.jboss.arquillian.protocol.servlet.ServletMethodExecutor$1.run(ServletMethodExecutor.java:95) at java.util.TimerThread.mainLoop(Timer.java:512) at java.util.TimerThread.run(Timer.java:462)

      When the serverHttps property is enabled in arquillian.xml, execution of in-container tests fail. The failure occurs at the point when the Arquillian client attempts to communicate with the Arquillian Test Runner Servlet. The serverHttps property is meant to allow for the client to communicate with the server (and the deployed test runner) over SSL, but since the test client (ServletUtil) constructs a URI with the "http" scheme and not "https", communication with the test runner fails.

      We'll need to

      • either remote this property for now, and bring this back in a future release when the test client can support communication with the Servlet test runner over SSL,
      • or bring in support in Arquillian Core to support communication with the Servlet test runner over SSL.

              vineet.reynolds_jira Vineet Reynolds (Inactive)
              vineet.reynolds_jira Vineet Reynolds (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: