From 5664939c14ed3e9a4cdc58f0ed7a60f4a22459e4 Mon Sep 17 00:00:00 2001 From: Tihomir Mateev Date: Wed, 19 Jun 2024 12:23:46 +0300 Subject: [PATCH 1/2] 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); From e2e263823684f0b411289b183d6d756bc60efac6 Mon Sep 17 00:00:00 2001 From: Tihomir Mateev Date: Wed, 19 Jun 2024 12:43:36 +0300 Subject: [PATCH 2/2] Refresh the template to include isntrustion how to format the code --- .github/PULL_REQUEST_TEMPLATE.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index e33dcd6309..6509c5c871 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -5,7 +5,7 @@ Make sure that: - [ ] You have read the [contribution guidelines](https://github.com/lettuce-io/lettuce-core/blob/main/.github/CONTRIBUTING.md). - [ ] You have created a feature request first to discuss your contribution intent. Please reference the feature request ticket number in the pull request. -- [ ] You use the code formatters provided [here](https://github.com/lettuce-io/lettuce-core/blob/main/formatting.xml) and have them applied to your changes. Don’t submit any formatting related changes. +- [ ] You applied code formatting rules using the `mvn formatter:format` target. Don’t submit any formatting related changes. - [ ] You submit test cases (unit or integration tests) that back your changes.