-
Notifications
You must be signed in to change notification settings - Fork 41k
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
Slice tests don't work with WebFlux/reactive model #11230
Comments
@asarkar Your rant is unhelpful and unwelcome in the issue tracker. Like most software projects we have limited time and resources. We're doing the best that we can. To address your issues:
I don't know what this means, please open a new issue with a more complete description along with a sample application that we can clone and run.
Correct, this annotation is designed to mock server calls for |
We don't and there is #10683 for that
No idea what that means but
What Phil said. There is also an issue in Spring Framework to update @asarkar a more positive way would be to come up with pull requests or dedicated issues with a technical analysis rather than dumping the stuff you want that doesn't work. |
Problem Description
Looks like most of the "slice" tests described in section 41.3.5 Auto-configured tests don't work with the WebFlux or reactive model.
@WebMvcTest
looks for controllers, and doesn't findRouterFunction
andRouterFunction
. Even if a@RestController
is made for WebFlux, it fails looking for Servlet-specific classes (I don't remember the exact error).@DataMongoTest
has no knowledge ofReactiveCrudRepository
and such.@RestClientTest
only configuresRestTemplateBuilder
, notWebClient
.Rant
Matter of fact, I've seen this problem with every major release. When Spring 3 was released, Java config was not fully ready, but was announced as a game changer. With Spring 4, Groovy support was a biggie, but it took couple of minor versions to get it working in idiomatic manner (like bean definitions in Groovy). With Spring 5, reactive model is hyped, but existing test framework doesn't fully support it. I understand why new features may be good fodder for elevator pitches, but it's very frustrating when the shiny new things actually have rust underneath.
The text was updated successfully, but these errors were encountered: