[
https://issues.jboss.org/browse/GTNWCI-25?page=com.atlassian.jira.plugin....
]
Matt Wringe commented on GTNWCI-25:
-----------------------------------
The issue here is the difference in the behaviour of sendRedirect between Tomcat and
Jetty. On Jetty when sendRedirect is called, it will immediately send a response back to
the client when this method is invoked. On Tomcat, it will wait until the service method
is complete before sending a response back to the client. According to the javadocs
(
http://download.oracle.com/javaee/5/api/javax/servlet/http/HttpServletRes...)
it looks like Jetty is implementing the correct behaviour.
Basically what is happening in the tests is this:
1) perform a login on the container. This will setup the authentication stuff and also
create a redirect for the login url with the authentication tokens
2) test that the login worked
3) create a jboss unit test response for the next steps.
The client part of jboss unit interacts with the tests through http. So when it calls the
test, it will wait for a response back before continuing.
On Tomcat this works because the test has already completed when it gets the redirect
response back.
On Jetty, it will start to continue right after the login attempt, before the rest of the
tests have completed and before the jboss unit test response is configure for the next
test steps.
SPICrossContextLogouTestCase fails with Jetty
---------------------------------------------
Key: GTNWCI-25
URL:
https://issues.jboss.org/browse/GTNWCI-25
Project: GateIn Web Container Integration
Issue Type: Bug
Reporter: Matt Wringe
Assignee: Matt Wringe
The SPICrossContextLogoutTestCase fails when used on Jetty.
The failure has been happening for a while, but the JBoss Unit default is to not stop the
build on failures and it doesn't create proper test reports to easily find the
problem. The build is now configured to fail on a test failure.
Unfortunately the wci tests are a bit fragile, and the failed test assertion in the
SPICrossContextLogoutTestCase causes error messages which have nothing to do with the test
failure. In order to see the failure, you will need to comment out the other tests in
test/core/src/main/resources/org/gatein/portal/test/web/spi/native/server-beans.xml, if
you don't comment out the other tests you will instead receive an error about not
being able to deploy artifacts due to them already existing.
The assertion in question is at line 114 (assertEquals("", v.value);) this line
gets called twice during the tests, the first time its called it works fine, the second
time its called is when the problem occurs.
--
This message is automatically generated by JIRA.
For more information on JIRA, see:
http://www.atlassian.com/software/jira