Correlated WebFlux server log messages
Issue: SPR-16966
This commit is contained in:
@@ -27,6 +27,9 @@ import org.springframework.web.server.WebFilter;
|
||||
import org.springframework.web.server.WebFilterChain;
|
||||
import org.springframework.web.server.adapter.WebHttpHandlerBuilder;
|
||||
|
||||
import static org.hamcrest.MatcherAssert.*;
|
||||
import static org.hamcrest.core.StringContains.*;
|
||||
|
||||
/**
|
||||
* Unit tests for {@link AbstractMockServerSpec}.
|
||||
* @author Rossen Stoyanchev
|
||||
@@ -49,8 +52,11 @@ public class MockServerSpecTests {
|
||||
}
|
||||
});
|
||||
|
||||
this.serverSpec.build().get().uri("/").exchange().expectBody(String.class)
|
||||
.isEqualTo("{test-attribute=:A:B}");
|
||||
this.serverSpec.build().get().uri("/")
|
||||
.exchange()
|
||||
.expectBody(String.class)
|
||||
.consumeWith(result -> assertThat(
|
||||
result.getResponseBody(), containsString("test-attribute=:A:B")));
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -70,8 +76,11 @@ public class MockServerSpecTests {
|
||||
}
|
||||
});
|
||||
|
||||
this.serverSpec.build().get().uri("/").exchange().expectBody(String.class)
|
||||
.isEqualTo("{test-attribute=:Fwk-A:Fwk-B:App-A:App-B}");
|
||||
this.serverSpec.build().get().uri("/")
|
||||
.exchange()
|
||||
.expectBody(String.class)
|
||||
.consumeWith(result -> assertThat(
|
||||
result.getResponseBody(), containsString("test-attribute=:Fwk-A:Fwk-B:App-A:App-B")));
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user