Expected Behavior
A bean that is annotated by @ClientFilter can declare @RequestFilters according to the documentation. I needed a test to always include some
computed headers in a client's request, so I've annotated the test (@MicronautTest) with a @ClientFilter, and added headers in a @RequestFilter annotated method.
I expected that all outgoing requests from the tests will be decorated
Actual Behaviour
The test actually threw StackOverflowError. See the example code in the demo application, class com.example.clientfilter.ClientFilterOverflow. When a separate bean class is annotated with @ClientFilter, the request goes OK.
If not fixable or not a bug, please document that @ClientFilter cannot be used directly at the test class.
Steps To Reproduce
- Clone the example app, https://github.com/sdedic/micronaut-dbbugs2, branch
clientfilter_stack
- Run the test
ClientFilterOverflow
Environment Information
- Ubuntu Linux 22.04
- Micronaut 4.7.6
Example Application
https://github.com/sdedic/micronaut-dbbugs2
Version
4.7.6
Expected Behavior
A bean that is annotated by
@ClientFiltercan declare@RequestFiltersaccording to the documentation. I needed a test to always include somecomputed headers in a client's request, so I've annotated the test (
@MicronautTest) with a@ClientFilter, and added headers in a@RequestFilterannotated method.I expected that all outgoing requests from the tests will be decorated
Actual Behaviour
The test actually threw StackOverflowError. See the example code in the demo application, class
com.example.clientfilter.ClientFilterOverflow. When a separate bean class is annotated with@ClientFilter, the request goes OK.If not fixable or not a bug, please document that
@ClientFiltercannot be used directly at the test class.Steps To Reproduce
clientfilter_stackClientFilterOverflowEnvironment Information
Example Application
https://github.com/sdedic/micronaut-dbbugs2
Version
4.7.6