DATAREDIS-1031 - Fix reactive pExpire/pExpireAt to invoke correct command.

We now invoke the correct PEXPIRE(AT) command. Previously, we invoked EXPIRE/EXPIREAT commands resulting in the wrong command being called.

Original Pull Request: #474
This commit is contained in:
Mark Paluch
2019-09-02 15:50:59 +02:00
committed by Christoph Strobl
parent 1c48021cea
commit 1ae1acf98f
3 changed files with 10 additions and 10 deletions

View File

@@ -278,7 +278,7 @@ public class LettuceReactiveKeyCommandsTests extends LettuceReactiveCommandsTest
assertThat(nativeCommands.ttl(KEY_1)).isGreaterThan(8L);
}
@Test // DATAREDIS-602
@Test // DATAREDIS-602, DATAREDIS-1031
public void shouldPreciseExpireKeysCorrectly() {
nativeCommands.set(KEY_1, VALUE_1);
@@ -288,10 +288,10 @@ public class LettuceReactiveKeyCommandsTests extends LettuceReactiveCommandsTest
.expectComplete() //
.verify();
assertThat(nativeCommands.ttl(KEY_1)).isGreaterThan(8L);
assertThat(nativeCommands.ttl(KEY_1)).isGreaterThan(8).isLessThan(11);
}
@Test // DATAREDIS-602
@Test // DATAREDIS-602, DATAREDIS-1031
public void shouldExpireAtKeysCorrectly() {
nativeCommands.set(KEY_1, VALUE_1);
@@ -302,10 +302,10 @@ public class LettuceReactiveKeyCommandsTests extends LettuceReactiveCommandsTest
.expectComplete() //
.verify();
assertThat(nativeCommands.ttl(KEY_1)).isGreaterThan(8L);
assertThat(nativeCommands.ttl(KEY_1)).isGreaterThan(8).isLessThan(11);
}
@Test // DATAREDIS-602
@Test // DATAREDIS-602, DATAREDIS-1031
public void shouldPreciseExpireAtKeysCorrectly() {
nativeCommands.set(KEY_1, VALUE_1);
@@ -316,7 +316,7 @@ public class LettuceReactiveKeyCommandsTests extends LettuceReactiveCommandsTest
.expectComplete() //
.verify();
assertThat(nativeCommands.ttl(KEY_1)).isGreaterThan(8L);
assertThat(nativeCommands.ttl(KEY_1)).isGreaterThan(8).isLessThan(11);
}
@Test // DATAREDIS-602