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