Skip to content
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

Update @MessageMapping to match input/output cardinality #7669

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -185,19 +185,6 @@ public void retrieveFluxWhenDataStringAndSecureThenDenied() throws Exception {
assertThat(this.controller.payloads).isEmpty();
}

@Test
public void retrieveFluxWhenDataStringAndPublicThenGranted() throws Exception {
String data = "a";
List<String> hi = this.requester.route("retrieve-flux")
.data(data)
.retrieveFlux(String.class)
.collectList()
.block();

assertThat(hi).contains("hello a");
assertThat(this.controller.payloads).containsOnly(data);
}

@Test
public void sendWhenSecureThenDenied() throws Exception {
String data = "hi";
Expand Down Expand Up @@ -287,7 +274,7 @@ Flux<String> retrieveFlux(Flux<String> payload) {
}

@MessageMapping({"secure.send", "send"})
Mono<Void> send(Flux<String> payload) {
Mono<Void> send(Mono<String> payload) {
return payload
.doOnNext(this::add)
.then(Mono.fromRunnable(() -> {
Expand Down