Skip to content
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

Function Server TCK: RequestFilterTest failing #926

Closed
andriy-dmytruk opened this issue Jun 14, 2024 · 1 comment
Closed

Function Server TCK: RequestFilterTest failing #926

andriy-dmytruk opened this issue Jun 14, 2024 · 1 comment

Comments

@andriy-dmytruk
Copy link
Contributor

Issue description

The Server TCK was added in this PR: #920.

Currently RequestFilterTest is failing.

The reason is that the BaseFilterProcessor expects an instance of ServerHttpRequest that can provide the body with ByteBody byteBody() method: https://github.com/micronaut-projects/micronaut-core/blob/39818ada8f3cabbe17ee4d61e19e13e4e0d1fef4/http/src/main/java/io/micronaut/http/filter/BaseFilterProcessor.java#L93-L109. This is not possible in this case, because InputEvent expects body input stream to be consumed immediately instead of giving it for further use.

In the #923 PR I added method consumeBody(Function<InputStream, T>) but it won't work in this case.

cc @yawkat

graemerocher pushed a commit that referenced this issue Jun 18, 2024
This PR adds Micronaut Server TCK for Oracle Cloud Function HTTP.

Currently, 10 of 188 tests (5%) fail.

Fixes:

* Making the request implementation mutable to support filters.
* Allow empty response when an exception is thrown micronaut-servlet#737
* Add support for parsing form data and support empty values in the form data.
* Support binding publisher when there is only one element.
* Support binding body parts for JSON case (so binding JSON properties).
* Fix reading cookies from headers.

Created issues:

Function Server TCK: Body has already been consumed exception #921
Function Server TCK: ControllerConstraintHandlerTest failing because of getBody() #925
Function Server TCK: RequestFilterTest failing #926
@yawkat
Copy link
Member

yawkat commented Jun 19, 2024

should be fixed by my change to #923

@yawkat yawkat closed this as completed Jun 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants