-
Notifications
You must be signed in to change notification settings - Fork 740
Closed
Labels
status: invalidSuggestion or bug report that we don't feel is validSuggestion or bug report that we don't feel is valid
Description
Hi.
I'm getting the following crash
java.lang.IllegalArgumentException: Request body incomplete.
at org.springframework.util.Assert.isTrue(Assert.java:116)
at org.springframework.test.web.reactive.server.ExchangeResult.getRequestBodyContent(ExchangeResult.java:149)
at org.springframework.restdocs.webtestclient.WebTestClientRequestConverter.convert(WebTestClientRequestConverter.java:73)
at org.springframework.restdocs.webtestclient.WebTestClientRequestConverter.convert(WebTestClientRequestConverter.java:60)
at org.springframework.restdocs.generate.RestDocumentationGenerator.handle(RestDocumentationGenerator.java:199)
at org.springframework.restdocs.webtestclient.WebTestClientRestDocumentation.lambda$document$0(WebTestClientRestDocumentation.java:81)
at org.springframework.test.web.reactive.server.DefaultWebTestClient$DefaultBodyContentSpec.lambda$consumeWith$2(DefaultWebTestClient.java:496)
at org.springframework.test.web.reactive.server.ExchangeResult.assertWithDiagnostics(ExchangeResult.java:194)
at org.springframework.test.web.reactive.server.DefaultWebTestClient$DefaultBodyContentSpec.consumeWith(DefaultWebTestClient.java:496)
at MyTest.testMain(MyTest.java:72)
The issue is related with the use of a request body with a post request.
This happens due to an assert Assert.isTrue(MonoProcessor.isTerminated()
. Inspecting that method isTerminated
returns subscribers == TERMINATED
, but in the case of the request body, debugging shows that subscribers == EMPTY
.
Testcase follows.
Metadata
Metadata
Assignees
Labels
status: invalidSuggestion or bug report that we don't feel is validSuggestion or bug report that we don't feel is valid