DATAREDIS-542 - Polishing.
Prevent putIfAbsent from prolonging expiration time of existing keys having same value. Remove some trailing white spaces. Original Pull Request: #224
This commit is contained in:
@@ -197,7 +197,7 @@ public class RedisCacheUnitTests {
|
||||
* @see DATAREDIS-542
|
||||
*/
|
||||
@Test
|
||||
public void putIfAbsentShouldExpireWhenValueWasNotSetAndRedisContainsSameData() {
|
||||
public void putIfAbsentShouldNotSetExpireWhenValueWasNotSetAndRedisContainsSameData() {
|
||||
|
||||
when(connectionMock.setNX(KEY_BYTES, VALUE_BYTES)).thenReturn(false);
|
||||
when(connectionMock.get(KEY_BYTES)).thenReturn(VALUE_BYTES);
|
||||
@@ -206,7 +206,7 @@ public class RedisCacheUnitTests {
|
||||
Cache.ValueWrapper valueWrapper = cache.putIfAbsent(KEY, VALUE);
|
||||
|
||||
assertThat(valueWrapper, is(notNullValue()));
|
||||
verify(connectionMock).expire(eq(KEY_BYTES), anyLong());
|
||||
verify(connectionMock, never()).expire(eq(KEY_BYTES), anyLong());
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user