Enable JSON conversion for non-Flux functions
- use ProxyWrapper around a FluxConsumer as well making it consistent with the behaviour of Flux functions - Enable introspection for scanned beans - Fix failing tests by passing JSON string as input messages (marshalled form expected from the binder)
This commit is contained in:
committed by
Dave Syer
parent
d1cf9b47a4
commit
70dff6bb6b
@@ -66,7 +66,7 @@ public class FluxPojoStreamingConsumerTests {
|
||||
|
||||
@Bean
|
||||
public Consumer<Flux<String>> sinkConsumer(final List<String> sinkCollector) {
|
||||
return foos -> foos.doOnNext(s -> sinkCollector.add(s));
|
||||
return foos -> foos.subscribe(s -> sinkCollector.add(s));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -52,7 +52,7 @@ public class FluxStreamingConsumerTests {
|
||||
|
||||
@Test
|
||||
public void test() throws Exception {
|
||||
sink.input().send(MessageBuilder.withPayload(new Foo("foo")).build());
|
||||
sink.input().send(MessageBuilder.withPayload(new String("{\"name\":\"foo\"}")).build());
|
||||
assertThat(sinkCollector).hasSize(1);
|
||||
}
|
||||
|
||||
|
||||
@@ -50,7 +50,7 @@ public class PojoStreamingConsumerTests {
|
||||
|
||||
@Test
|
||||
public void test() throws Exception {
|
||||
sink.input().send(MessageBuilder.withPayload(new Foo("foo")).build());
|
||||
sink.input().send(MessageBuilder.withPayload(new String("{\"name\":\"foo\"}")).build());
|
||||
assertThat(sinkCollector).hasSize(1);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user