parent
809851c0fe
commit
b9f7b0d955
|
|
@ -27,7 +27,7 @@ configure(allprojects) { project ->
|
|||
imports {
|
||||
mavenBom "com.fasterxml.jackson:jackson-bom:2.11.3"
|
||||
mavenBom "io.netty:netty-bom:4.1.52.Final"
|
||||
mavenBom "io.projectreactor:reactor-bom:2020.0.0-SNAPSHOT"
|
||||
mavenBom "io.projectreactor:reactor-bom:2020.0.0-RC2"
|
||||
mavenBom "io.r2dbc:r2dbc-bom:Arabba-SR7"
|
||||
mavenBom "io.rsocket:rsocket-bom:1.1.0-M2"
|
||||
mavenBom "org.eclipse.jetty:jetty-bom:9.4.31.v20200723"
|
||||
|
|
@ -291,7 +291,7 @@ configure(allprojects) { project ->
|
|||
repositories {
|
||||
mavenCentral()
|
||||
maven { url "https://repo.spring.io/libs-spring-framework-build" }
|
||||
maven { url "https://repo.spring.io/snapshot" } // Reactor
|
||||
maven { url "https://repo.spring.io/milestone" } // Reactor
|
||||
}
|
||||
}
|
||||
configurations.all {
|
||||
|
|
|
|||
|
|
@ -25,8 +25,8 @@ import kotlinx.coroutines.Deferred;
|
|||
import org.junit.jupiter.api.Nested;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.reactivestreams.Publisher;
|
||||
import reactor.core.CoreSubscriber;
|
||||
import reactor.core.publisher.Flux;
|
||||
import reactor.core.publisher.FluxProcessor;
|
||||
import reactor.core.publisher.Mono;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
|
@ -45,16 +45,16 @@ class ReactiveAdapterRegistryTests {
|
|||
void getAdapterForReactiveSubType() {
|
||||
|
||||
ReactiveAdapter adapter1 = getAdapter(Flux.class);
|
||||
ReactiveAdapter adapter2 = getAdapter(FluxProcessor.class);
|
||||
ReactiveAdapter adapter2 = getAdapter(ExtendedFlux.class);
|
||||
|
||||
assertThat(adapter2).isSameAs(adapter1);
|
||||
|
||||
this.registry.registerReactiveType(
|
||||
ReactiveTypeDescriptor.multiValue(FluxProcessor.class, FluxProcessor::empty),
|
||||
o -> (FluxProcessor<?, ?>) o,
|
||||
FluxProcessor::from);
|
||||
ReactiveTypeDescriptor.multiValue(ExtendedFlux.class, ExtendedFlux::empty),
|
||||
o -> (ExtendedFlux<?>) o,
|
||||
ExtendedFlux::from);
|
||||
|
||||
ReactiveAdapter adapter3 = getAdapter(FluxProcessor.class);
|
||||
ReactiveAdapter adapter3 = getAdapter(ExtendedFlux.class);
|
||||
|
||||
assertThat(adapter3).isNotNull();
|
||||
assertThat(adapter3).isNotSameAs(adapter1);
|
||||
|
|
@ -363,4 +363,12 @@ class ReactiveAdapterRegistryTests {
|
|||
return adapter;
|
||||
}
|
||||
|
||||
|
||||
private static class ExtendedFlux<T> extends Flux<T> {
|
||||
|
||||
@Override
|
||||
public void subscribe(CoreSubscriber actual) {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue