From 620a898e60f107afe963f9e2db9c78e54f3fd399 Mon Sep 17 00:00:00 2001 From: Rossen Stoyanchev Date: Mon, 11 Mar 2019 08:42:23 -0400 Subject: [PATCH 1/2] Fix typo in documentation See gh-22394 --- src/docs/asciidoc/web/websocket.adoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/docs/asciidoc/web/websocket.adoc b/src/docs/asciidoc/web/websocket.adoc index 3a7f50df11..b5683c7f62 100644 --- a/src/docs/asciidoc/web/websocket.adoc +++ b/src/docs/asciidoc/web/websocket.adoc @@ -695,8 +695,8 @@ The following example shows how to do so in Java configuration: [subs="verbatim,quotes"] ---- @Configuration - @EnableWebSocket - public class WebSocketConfig implements WebSocketConfigurer { + @EnableWebSocketMessageBroker + public class WebSocketConfig implements WebSocketMessageBrokerConfigurer { @Override public void registerStompEndpoints(StompEndpointRegistry registry) { From b343e73eb0f7b80d4357454577a2e4e023d82125 Mon Sep 17 00:00:00 2001 From: Rossen Stoyanchev Date: Mon, 11 Mar 2019 09:13:49 -0400 Subject: [PATCH 2/2] Add streaming responses to Spring MVC Test section Closes gh-22544 --- src/docs/asciidoc/testing.adoc | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/docs/asciidoc/testing.adoc b/src/docs/asciidoc/testing.adoc index 7fba45989e..8afc4f7e23 100644 --- a/src/docs/asciidoc/testing.adoc +++ b/src/docs/asciidoc/testing.adoc @@ -5132,6 +5132,20 @@ instances, as the following example shows: Registered filters are invoked through the `MockFilterChain` from `spring-test`, and the last filter delegates to the `DispatcherServlet`. + +[[spring-mvc-test-vs-streaming-response]] +===== Streaming Responses + +There are no options built into Spring MVC Test for container-less testing of streaming +responses. Applications that make use of +<> options can use the +<> to perform end-to-end, integration +tests against a running server. This is also supported in Spring Boot where you can +https://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#boot-features-testing-spring-boot-applications-testing-with-running-server[test a running server] +with `WebTestClient`. One extra advantage is the ability to use the `StepVerifier` from +project Reactor that allows declaring expectations on a stream of data. + + [[spring-mvc-test-vs-end-to-end-integration-tests]] ===== Differences Between Out-of-Container and End-to-End Integration Tests