DATAREDIS-791 - Polishing.

Migrate tests to use StepVerifier instead of block(). Simplify isUpsert() comparison.

Original Pull Request: #325
This commit is contained in:
Mark Paluch
2018-03-22 14:55:38 +01:00
committed by Christoph Strobl
parent 2902d3fb4a
commit 7e3ba99e29
2 changed files with 39 additions and 29 deletions

View File

@@ -34,7 +34,6 @@ import org.springframework.data.redis.connection.ReactiveRedisConnection.KeyComm
import org.springframework.data.redis.connection.ReactiveRedisConnection.MultiValueResponse;
import org.springframework.data.redis.connection.ReactiveRedisConnection.NumericResponse;
import org.springframework.util.Assert;
import org.springframework.util.ObjectUtils;
/**
* @author Christoph Strobl
@@ -74,7 +73,7 @@ class LettuceReactiveHashCommands implements ReactiveHashCommands {
Entry<ByteBuffer, ByteBuffer> entry = command.getFieldValueMap().entrySet().iterator().next();
result = ObjectUtils.nullSafeEquals(command.isUpsert(), Boolean.TRUE)
result = command.isUpsert()
? cmd.hset(command.getKey(), entry.getKey(), entry.getValue())
: cmd.hsetnx(command.getKey(), entry.getKey(), entry.getValue());
} else {