-
Type: Bug
-
Status: Resolved
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: 5.8
-
Fix Version/s: 6.0
-
Component/s: Automation, Tests
-
Tags:
-
Backlog priority:300
Sometimes automation client never gets an answer from the server.
Set aside the actual issue (not getting an answer), unit tests should keep on running after a user-defined timeout.
The default feature creating an automation client at org.nuxeo.ecm.automation.test.EmbeddedAutomationServerFeature should instantiate HttpAutomationClient with a non-zero timeout (like 30s) by default.
Reproduced here:
https://qa.nuxeo.org/jenkins/job/ondemand-testandpush-atchertchian-aws-oneshot/46/
jstack on the server gave:
at java.net.SocketInputStream.socketRead0(Native Method) at java.net.SocketInputStream.read(SocketInputStream.java:152) at java.net.SocketInputStream.read(SocketInputStream.java:122) at org.apache.http.impl.io.AbstractSessionInputBuffer.fillBuffer(AbstractSessionInputBuffer.java:166) at org.apache.http.impl.io.SocketInputBuffer.fillBuffer(SocketInputBuffer.java:90) at org.apache.http.impl.io.AbstractSessionInputBuffer.readLine(AbstractSessionInputBuffer.java:281) at org.apache.http.impl.conn.LoggingSessionInputBuffer.readLine(LoggingSessionInputBuffer.java:115) at org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(DefaultHttpResponseParser.java:92) at org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(DefaultHttpResponseParser.java:62) at org.apache.http.impl.io.AbstractMessageParser.parse(AbstractMessageParser.java:254) at org.apache.http.impl.AbstractHttpClientConnection.receiveResponseHeader(AbstractHttpClientConnection.java:289) at org.apache.http.impl.conn.DefaultClientConnection.receiveResponseHeader(DefaultClientConnection.java:252) at org.apache.http.impl.conn.ManagedClientConnectionImpl.receiveResponseHeader(ManagedClientConnectionImpl.java:191) at org.apache.http.protocol.HttpRequestExecutor.doReceiveResponse(HttpRequestExecutor.java:300) at org.apache.http.protocol.HttpRequestExecutor.execute(HttpRequestExecutor.java:127) at org.apache.http.impl.client.DefaultRequestDirector.tryExecute(DefaultRequestDirector.java:716) at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:521) at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:906) at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:805) at org.nuxeo.ecm.automation.client.jaxrs.impl.HttpConnector.executeRequestWithTimeout(HttpConnector.java:173) at org.nuxeo.ecm.automation.client.jaxrs.impl.HttpConnector.execute(HttpConnector.java:131) at org.nuxeo.ecm.automation.client.jaxrs.impl.HttpConnector.execute(HttpConnector.java:118) at org.nuxeo.ecm.automation.client.jaxrs.spi.ConnectorHandler.execute(ConnectorHandler.java:30) at org.nuxeo.ecm.automation.client.jaxrs.spi.AbstractAutomationClient.login(AbstractAutomationClient.java:193) at org.nuxeo.ecm.automation.client.jaxrs.spi.AbstractAutomationClient.getSession(AbstractAutomationClient.java:134) at org.nuxeo.ecm.automation.client.jaxrs.spi.AbstractAutomationClient.getSession(AbstractAutomationClient.java:147) at org.nuxeo.ecm.automation.client.jaxrs.spi.AbstractAutomationClient.getSession(AbstractAutomationClient.java:138) at org.nuxeo.drive.operations.TestFileSystemItemOperations.init(TestFileSystemItemOperations.java:200) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606)
Test was still running 1h later.