DATAREDIS-624 - Upgrade to Reactor 3.1.0.BUILD-SNAPSHOT.

Translate `Mono.then` -> `flatMap`, `Mono.flatMap` -> `flatMapMany`.
This still fails as we also need a compatible version of lettuce.

Original pull request: #245.
This commit is contained in:
Christoph Strobl
2017-04-12 08:58:41 +02:00
committed by Mark Paluch
parent 04e3465081
commit 2c14460643
8 changed files with 24 additions and 31 deletions

View File

@@ -125,7 +125,7 @@ public class DefaultReactiveListOperationsIntegrationTests<K, V> {
StepVerifier.create(listOperations.leftPush(key, value1)).expectNext(1L).verifyComplete();
StepVerifier.create(listOperations.leftPush(key, value2)).expectNext(2L).verifyComplete();
StepVerifier.create(listOperations.range(key, 0, -1).flatMap(Flux::fromIterable)).expectNext(value2)
StepVerifier.create(listOperations.range(key, 0, -1).flatMapMany(Flux::fromIterable)).expectNext(value2)
.expectNext(value1).verifyComplete();
}
@@ -140,7 +140,7 @@ public class DefaultReactiveListOperationsIntegrationTests<K, V> {
StepVerifier.create(listOperations.leftPushAll(key, value1, value2)).expectNext(2L).verifyComplete();
StepVerifier.create(listOperations.range(key, 0, -1).flatMap(Flux::fromIterable)).expectNext(value2)
StepVerifier.create(listOperations.range(key, 0, -1).flatMapMany(Flux::fromIterable)).expectNext(value2)
.expectNext(value1).verifyComplete();
}
@@ -170,7 +170,7 @@ public class DefaultReactiveListOperationsIntegrationTests<K, V> {
StepVerifier.create(listOperations.leftPush(key, value1, value3)).expectNext(3L).verifyComplete();
StepVerifier.create(listOperations.range(key, 0, -1).flatMap(Flux::fromIterable)).expectNext(value2)
StepVerifier.create(listOperations.range(key, 0, -1).flatMapMany(Flux::fromIterable)).expectNext(value2)
.expectNext(value3).expectNext(value1).verifyComplete();
}
@@ -186,7 +186,7 @@ public class DefaultReactiveListOperationsIntegrationTests<K, V> {
StepVerifier.create(listOperations.rightPush(key, value1)).expectNext(1L).verifyComplete();
StepVerifier.create(listOperations.rightPush(key, value2)).expectNext(2L).verifyComplete();
StepVerifier.create(listOperations.range(key, 0, -1).flatMap(Flux::fromIterable)).expectNext(value1)
StepVerifier.create(listOperations.range(key, 0, -1).flatMapMany(Flux::fromIterable)).expectNext(value1)
.expectNext(value2).verifyComplete();
}
@@ -201,7 +201,7 @@ public class DefaultReactiveListOperationsIntegrationTests<K, V> {
StepVerifier.create(listOperations.rightPushAll(key, value1, value2)).expectNext(2L).verifyComplete();
StepVerifier.create(listOperations.range(key, 0, -1).flatMap(Flux::fromIterable)).expectNext(value1)
StepVerifier.create(listOperations.range(key, 0, -1).flatMapMany(Flux::fromIterable)).expectNext(value1)
.expectNext(value2).verifyComplete();
}
@@ -231,7 +231,7 @@ public class DefaultReactiveListOperationsIntegrationTests<K, V> {
StepVerifier.create(listOperations.rightPush(key, value1, value3)).expectNext(3L).verifyComplete();
StepVerifier.create(listOperations.range(key, 0, -1).flatMap(Flux::fromIterable)).expectNext(value1)
StepVerifier.create(listOperations.range(key, 0, -1).flatMapMany(Flux::fromIterable)).expectNext(value1)
.expectNext(value3).expectNext(value2).verifyComplete();
}
@@ -248,7 +248,7 @@ public class DefaultReactiveListOperationsIntegrationTests<K, V> {
StepVerifier.create(listOperations.set(key, 1, value1)).expectNext(true).verifyComplete();
StepVerifier.create(listOperations.range(key, 0, -1).flatMap(Flux::fromIterable)).expectNext(value1)
StepVerifier.create(listOperations.range(key, 0, -1).flatMapMany(Flux::fromIterable)).expectNext(value1)
.expectNext(value1).verifyComplete();
}
@@ -265,7 +265,7 @@ public class DefaultReactiveListOperationsIntegrationTests<K, V> {
StepVerifier.create(listOperations.remove(key, 1, value1)).expectNext(1L).verifyComplete();
StepVerifier.create(listOperations.range(key, 0, -1).flatMap(Flux::fromIterable)).expectNext(value2)
StepVerifier.create(listOperations.range(key, 0, -1).flatMapMany(Flux::fromIterable)).expectNext(value2)
.verifyComplete();
}

View File

@@ -37,8 +37,6 @@ import org.reactivestreams.Subscriber;
import org.reactivestreams.Subscription;
import reactor.core.Fuseable;
import reactor.core.Receiver;
import reactor.core.Trackable;
import reactor.core.publisher.Operators;
/**
@@ -95,7 +93,7 @@ import reactor.core.publisher.Operators;
* @author Stephane Maldini
* @author Brian Clozel
*/
public class TestSubscriber<T> implements Subscriber<T>, Subscription, Trackable, Receiver {
public class TestSubscriber<T> implements Subscriber<T>, Subscription {
/**
* Default timeout for waiting next values to be received
@@ -839,17 +837,14 @@ public class TestSubscriber<T> implements Subscriber<T>, Subscription, Trackable
}
}
@Override
public final boolean isCancelled() {
return s == Operators.cancelledSubscription();
}
@Override
public final boolean isStarted() {
return s != null;
}
@Override
public final boolean isTerminated() {
return isCancelled();
}
@@ -953,7 +948,6 @@ public class TestSubscriber<T> implements Subscriber<T>, Subscription, Trackable
}
}
@Override
public final long requestedFromDownstream() {
return requested;
}
@@ -969,7 +963,6 @@ public class TestSubscriber<T> implements Subscriber<T>, Subscription, Trackable
return this;
}
@Override
public Subscription upstream() {
return s;
}