Skip to content

MockMvc async does not re-use response instance on async dispatch [SPR-16067] #20616

Closed
@spring-projects-issues

Description

@spring-projects-issues

Lukas Krecan opened SPR-16067 and commented

I have a MockMvc test for testing controller with deferred result. It works nice, unit the moment I add ShallowEtagFilter which assumes that the response from the async start request is kept for the following processing. MockMvc.perform always creates new MockHttpServletResponse which causes ShallowEtagFilter to fail. Please, see this demo project for details https://github.com/lukas-krecan-lt/async-demo


Affects: 4.3.11

Reference URL: https://github.com/lukas-krecan-lt/async-demo/blob/master/src/test/java/com/example/asyncdemo/AsyncControllerTest.java

Issue Links:

Referenced from: commits cd63463

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions