GH-243, GH-257 Added reactive consumer wrapper
- Added wrapper for an already reactive consumer to ensure that consumers can be consistently represented as Function<Flux, Mono> - Fixed the big that deal with inconsistent result in web environments due to inconsistent representation of the Consumers - Polished tests Resolves #243 Resolves #257
This commit is contained in:
@@ -560,10 +560,10 @@ public class ContextFunctionCatalogAutoConfigurationTests {
|
||||
"spring.cloud.function.compile.foos.lambda=f -> f.subscribe("
|
||||
+ getClass().getName() + "::set)",
|
||||
"spring.cloud.function.compile.foos.type=consumer");
|
||||
assertThat((Consumer<?>) this.catalog.lookup(Consumer.class, "foos"))
|
||||
.isInstanceOf(Consumer.class);
|
||||
assertThat((Function<?, ?>) this.catalog.lookup(Function.class, "foos"))
|
||||
.isInstanceOf(Function.class);
|
||||
assertThat(this.inspector
|
||||
.getInputWrapper(this.catalog.lookup(Consumer.class, "foos")))
|
||||
.getInputWrapper(this.catalog.lookup(Function.class, "foos")))
|
||||
.isEqualTo(Flux.class);
|
||||
@SuppressWarnings("unchecked")
|
||||
Consumer<Flux<String>> consumer = (Consumer<Flux<String>>) this.context
|
||||
|
||||
Reference in New Issue
Block a user