DATAREDIS-1150 - Polishing

Defer cluster topology resolution, update Javadoc and add tests.

Original Pull Request: #533
This commit is contained in:
Christoph Strobl
2020-06-17 09:26:39 +02:00
parent 9501036754
commit bf4f41bf52
3 changed files with 58 additions and 34 deletions

View File

@@ -22,7 +22,6 @@ import reactor.test.StepVerifier;
import java.nio.ByteBuffer;
import org.junit.Test;
import org.springframework.data.redis.connection.ReactiveClusterCommands;
import org.springframework.data.redis.connection.RedisClusterNode;
@@ -33,9 +32,21 @@ import org.springframework.data.redis.connection.RedisClusterNode;
* the master node.
*
* @author Mark Paluch
* @author Christoph Strobl
*/
public class LettuceReactiveClusterCommandsTests extends LettuceReactiveClusterCommandsTestsBase {
@Test // DATAREDIS-1150
public void pingShouldReturnPong() {
connection.ping().as(StepVerifier::create).expectNext("PONG").verifyComplete();
}
@Test // DATAREDIS-1150
public void pingShouldReturnPongForServers() {
connection.clusterGetNodes().flatMap(connection::ping).as(StepVerifier::create)
.expectNext("PONG", "PONG", "PONG", "PONG").verifyComplete();
}
@Test // DATAREDIS-1150
public void clusterGetNodesShouldReturnNodes() {