From 5664939c14ed3e9a4cdc58f0ed7a60f4a22459e4 Mon Sep 17 00:00:00 2001 From: Tihomir Mateev Date: Wed, 19 Jun 2024 12:23:46 +0300 Subject: [PATCH] Server addressed the issues of empty list returned for missing keys --- .../lettuce/core/commands/HashCommandIntegrationTests.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/test/java/io/lettuce/core/commands/HashCommandIntegrationTests.java b/src/test/java/io/lettuce/core/commands/HashCommandIntegrationTests.java index f6148209c6..4984914641 100644 --- a/src/test/java/io/lettuce/core/commands/HashCommandIntegrationTests.java +++ b/src/test/java/io/lettuce/core/commands/HashCommandIntegrationTests.java @@ -560,7 +560,7 @@ void hexpire() { assertThat(redis.hexpire(MY_KEY, 0, MY_FIELD)).containsExactly(2L); assertThat(redis.hset(MY_KEY, MY_FIELD, MY_VALUE)).isTrue(); assertThat(redis.hexpire(MY_KEY, 1, MY_FIELD, MY_SECOND_FIELD)).containsExactly(1L, -2L); - assertThat(redis.hexpire("invalidKey", 1, MY_FIELD)).isEmpty(); + assertThat(redis.hexpire("invalidKey", 1, MY_FIELD)).containsExactly(-2L); await().until(() -> redis.hget(MY_KEY, MY_FIELD) == null); } @@ -584,7 +584,7 @@ void hexpireat() { assertThat(redis.hexpireat(MY_KEY, Instant.now().minusSeconds(1), MY_FIELD)).containsExactly(2L); assertThat(redis.hset(MY_KEY, MY_FIELD, MY_VALUE)).isTrue(); assertThat(redis.hexpireat(MY_KEY, Instant.now().plusSeconds(1), MY_FIELD)).containsExactly(1L); - assertThat(redis.hexpireat("invalidKey", Instant.now().plusSeconds(1), MY_FIELD)).isEmpty(); + assertThat(redis.hexpireat("invalidKey", Instant.now().plusSeconds(1), MY_FIELD)).containsExactly(-2L); await().until(() -> redis.hget(MY_KEY, MY_FIELD) == null); } @@ -609,7 +609,7 @@ void hexpiretime() { @Test @EnabledOnCommand("HPERSIST") void hpersist() { - assertThat(redis.hpersist(MY_KEY, MY_FIELD)).isEmpty(); + assertThat(redis.hpersist(MY_KEY, MY_FIELD)).containsExactly(-2L); assertThat(redis.hset(MY_KEY, MY_FIELD, MY_VALUE)).isTrue(); assertThat(redis.hpersist(MY_KEY, MY_FIELD)).containsExactly(-1L);