Compatibility with RxJava 3.0
Closes gh-23208
This commit is contained in:
@@ -186,7 +186,7 @@ public class ReactiveAdapterRegistryTests {
|
|||||||
Object target = getAdapter(io.reactivex.Completable.class).fromPublisher(source);
|
Object target = getAdapter(io.reactivex.Completable.class).fromPublisher(source);
|
||||||
boolean condition = target instanceof io.reactivex.Completable;
|
boolean condition = target instanceof io.reactivex.Completable;
|
||||||
assertThat(condition).isTrue();
|
assertThat(condition).isTrue();
|
||||||
assertThat(((io.reactivex.Completable) target).blockingGet()).isNull();
|
((io.reactivex.Completable) target).blockingAwait();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|||||||
@@ -649,9 +649,8 @@ public class RequestMappingMessageConversionIntegrationTests extends AbstractReq
|
|||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/rxjava2-single")
|
@PostMapping("/rxjava2-single")
|
||||||
@SuppressWarnings("deprecation")
|
|
||||||
public io.reactivex.Completable createWithRxJava2Single(@RequestBody io.reactivex.Single<Person> single) {
|
public io.reactivex.Completable createWithRxJava2Single(@RequestBody io.reactivex.Single<Person> single) {
|
||||||
return single.map(persons::add).toCompletable();
|
return single.map(persons::add).ignoreElement();
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/flux")
|
@PostMapping("/flux")
|
||||||
@@ -665,17 +664,15 @@ public class RequestMappingMessageConversionIntegrationTests extends AbstractReq
|
|||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/rxjava2-observable")
|
@PostMapping("/rxjava2-observable")
|
||||||
@SuppressWarnings("deprecation")
|
|
||||||
public io.reactivex.Completable createWithRxJava2Observable(
|
public io.reactivex.Completable createWithRxJava2Observable(
|
||||||
@RequestBody io.reactivex.Observable<Person> observable) {
|
@RequestBody io.reactivex.Observable<Person> observable) {
|
||||||
|
|
||||||
return observable.toList().doOnSuccess(persons::addAll).toCompletable();
|
return observable.toList().doOnSuccess(persons::addAll).ignoreElement();
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/flowable")
|
@PostMapping("/flowable")
|
||||||
@SuppressWarnings("deprecation")
|
|
||||||
public io.reactivex.Completable createWithFlowable(@RequestBody Flowable<Person> flowable) {
|
public io.reactivex.Completable createWithFlowable(@RequestBody Flowable<Person> flowable) {
|
||||||
return flowable.toList().doOnSuccess(persons::addAll).toCompletable();
|
return flowable.toList().doOnSuccess(persons::addAll).ignoreElement();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user