-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Test for ee10 response commit #9048
Conversation
@lachlan-roberts @janbartel do either one of you want to take this one? |
@lachlan-roberts @janbartel I think |
@gregw were you expecting the test cases to fail here? |
@lachlan-roberts my change to use the core isCommitted state fixed the test.... but it leaves kruft in HttpOutput, as the committed state is still there and not used... as is a method for intermediate 1xx responses reopening the printwriter after commit. So it needs review and cleanup |
Signed-off-by: Lachlan Roberts <[email protected]>
Signed-off-by: Lachlan Roberts <[email protected]>
@lachlan-roberts can you also review org.eclipse.jetty.ee10.servlet.ServletRequestState#asyncError which is not called. Need to check if that is correct and that onError is correctly called when necessary. |
Signed-off-by: Lachlan Roberts <[email protected]>
// Release the chunk immediately, if it is empty. | ||
if (!_chunk.hasRemaining() && !_chunk.isTerminal()) | ||
if (_chunk != null && !_chunk.hasRemaining() && !_chunk.isTerminal()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sbordet can you review this change.
Looks like if we ever hit line 281 then _chunk
will be null here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we need to avoid using isTerminal as a condition for releasing. We should just release any chunk we are given.
@lachlan-roberts I can't review as I created the PR. Other than the question about releasing terminal chunks (which @sbordet is addressing in another PR anyway), I think this is good. So if you think so too, then you can approve and I will merge. |
@lachlan-roberts @gregw I have just tested this PR with TCK and I get this error
|
Signed-off-by: Lachlan Roberts <[email protected]>
@olamy can you please test this again with TCK |
no more NPE but this increase the failure number by 7 |
@olamy can you link us to the new failures? |
@olamy I just synced this branch with head, so that might fix some unrelated failures? |
@gregw re run TCK with synced branch and definitely get better result! |
This is a test and a partial fix demonstration that the response committed state is not correctly handled in ee10.
Currently the
ServletRequestState
class tracks theOutputState
which includes theCOMMITTED
state. But currently nothing callsorg.eclipse.jetty.ee10.servlet.ServletRequestState#commitResponse
, so that state is never entered.The partial fix is to use the committed state from the core request. If this is sufficient then the
OutputState
needs to be reviewed to see what states it should track.