Skip to content

Commit db7d477

Browse files
committed
Document @WebFluxTest limitation with RouterFunction
Fixes gh-10683
1 parent a6a523b commit db7d477

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

spring-boot-project/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6534,6 +6534,10 @@ example shows a class that uses both `@WebFluxTest` and a `WebTestClient`:
65346534
A list of the auto-configuration that is enabled by `@WebFluxTest` can be
65356535
<<appendix-test-auto-configuration#test-auto-configuration,found in the appendix>>.
65366536

6537+
NOTE: `@WebFluxTest` cannot be used for testing routes registered via the functional
6538+
web framework. For testing `RouterFunction` beans in the context, consider using
6539+
`@SpringBootTest`.
6540+
65376541
TIP: Sometimes writing Spring WebFlux tests is not enough; Spring Boot can help you run
65386542
<<boot-features-testing-spring-boot-applications-testing-with-running-server,
65396543
full end-to-end tests with an actual server>>.

0 commit comments

Comments
 (0)