-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TCK Challenge Tests with FailingHttpStatusCode exception #389
Comments
This challenge is linked to a discussion on mailing list which started with this post - https://www.eclipse.org/lists/cdi-dev/msg00618.html IIRC, for the sake of TCK test it doesn't even matter if the returned code of 200 or 500 (the code isn't checked at all). Whether this is right or wrong is a good question for someone from servlet spec I guess (does anyone know who to Note that in the mailing thread, most participating people opted towards current TCK setup being correct from Servlet specification PoV. But also noted that the spec might need clarifications in this regard. |
@markt-asf is the one to mention here, but he already answered the question in the email thread. When a Servlet throws an exception during an async process, should the response be automatically set to 500, or is it the responsibility of the error handler to set the 500 (or other code). That's the main question. Might also be good to compare what plain Tomcat is doing here, even though it doesn't run the CDI TCK; just create a similar situation with an async request and exception and check what gets send to the client. |
@manovotn @arjantijms Hi guys, Do you have any update on this?. On our side we exclude the test from our arquillian tck configuration |
@breakponchito did you ever check what Tomcat and/or Jetty are doing in this situation? It should be relatively easy to create a separate war with the same situation (without CDI) deploy that to Tomcat, and see what happens. |
@arjantijms I'm going to review today, thanks. I'll let you know my findings |
Since there is no reference to servlet spec which would imply the behavior, at least not from what I could find or what was mentioned here, I don't think you can claim the challenge valid. So I'd actually suggest to mark the challenge as |
Do you mean to add the change to the following TCK tests? for all of them we just need to set the following property as false: |
Is this not the perfect grounds for the challenge to be valid? The TCK mandates behaviour from the server which is not defined by any specification. It would surely fall under this point of the TCK Process for valid challenges:
|
Yes, that's exactly what I meant.
The test doesn't assert on return value of |
I've added the invalid tag and approved the PR but I've also requested review from Ladislav to have a second pair of eyes on this. |
I'm still unclear on how this is an invalid challenge. Since you're rejecting the challenge, and given that we can't pass the TCK unless we modify Payara specifically to satisfy this test, we would need a service release of the TCK ASAP please. |
The test doesn't care what it returns, it makes no assertions on status code and has been like this for a long time.
I am not sure why does it matter so much whether it is or isn't challenge but we can sure cut a release. |
I think we're talking around each other now :P It matters if the challenge is rejected because it means we can't exclude the test from runs of the TCK and still attempt to certify - we'd be stuck until a new version of the 4.0.x TCK was released with the merged fix. |
yes please, help us to do it |
4.0.6 should now be released and syncing with Central. |
Specification:
cdi 4.0
Challenged test(s):
org.jboss.cdi.tck.tests.context.application.async.ApplicationContextAsyncListenerTest#testApplicationContextActiveOnError
org.jboss.cdi.tck.tests.context.conversation.determination.ConversationDeterminationTest#testConversationDetermination
org.jboss.cdi.tck.tests.context.request.async.RequestContextAsyncListenerTest#testRequestContextActiveOnError
org.jboss.cdi.tck.tests.context.session.async.SessionContextAsyncListenerTest#testSessionContextActiveOnError
TCK version:
4.0.5
Tested implementation:
Payara 6 (branch) with:
Description:
The tests are failing because of the following exception thrown: com.gargoylesoftware.htmlunit.FailingHttpStatusCodeException: 500 Internal Server Error
those tests are throwing ServletException as part of the flow to test and the Payara Server side is setting the 500 error, but on the TCK side with the htmlunit framework those errors are Wrapped by a new exception the FailingHttpStatusCodeException. This is the wrong behavior and we don't want to hack the server side to return different codes.
We saw a way to solve this but it is on the TCK side by setting the following property to false: webClient.getOptions().setThrowExceptionOnFailingStatusCode(false)
With this value set to false all the failing tests will pass without hack the server side
Error Logs:
error-logs.txt
The text was updated successfully, but these errors were encountered: