]
Aslak Knutsen updated ARQ-428:
------------------------------
Component/s: Test Protocol SPIs and Implementation
(was: Base Implementation)
EOFException on Websphere
-------------------------
Key: ARQ-428
URL:
https://issues.jboss.org/browse/ARQ-428
Project: Arquillian
Issue Type: Bug
Security Level: Public(Everyone can see)
Components: Test Protocol SPIs and Implementation
Affects Versions: 1.0.0.Alpha5
Reporter: Yves Langisch
When running tests on a Websphere container (with the WAS module) I often get
EOFExceptions on the client side (especially when the test fails). After some debugging on
both sides I noticed that whenever I get the EOFException the ObjectInputStream seems to
be empty. That's why it fails to read the magic number which is the first
unmarshalling action for the TestResult on the client side. So the problem seems to be on
the server side.
I think that the issue is in the writeObject method of the ServletTestRunner class.
According to the API doc
(
http://download.oracle.com/javaee/5/api/javax/servlet/http/HttpServletRes...)
HttpServletRespone#setStatus may clear the buffer. The marshalling action (writeObject) is
done before setting the http status code so (depending on the state of the container
buffer) the buffer with the marshalled TestResult may be cleared. That leads to an empty
response.
Setting the status code before marshalling the object resolved the issue for me.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: