Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
* Go: Add `BZPopMin` ([#2849](https://github.com/valkey-io/valkey-glide/pull/2849))
* Java: Shadow `protobuf` dependency ([#2931](https://github.com/valkey-io/valkey-glide/pull/2931))
* Java: Add `RESP2` support ([#2383](https://github.com/valkey-io/valkey-glide/pull/2383))
* Java: Fix `lpopCount` null handling ([#3025](https://github.com/valkey-io/valkey-glide/pull/3025))
* Node, Python: Add `IFEQ` option ([#2909](https://github.com/valkey-io/valkey-glide/pull/2909), [#2962](https://github.com/valkey-io/valkey-glide/pull/2962))

#### Breaking Changes
Expand Down
4 changes: 2 additions & 2 deletions java/client/src/main/java/glide/api/BaseClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -1384,15 +1384,15 @@ public CompletableFuture<String[]> lpopCount(@NonNull String key, long count) {
return commandManager.submitNewCommand(
LPop,
new String[] {key, Long.toString(count)},
response -> castArray(handleArrayResponse(response), String.class));
response -> castArray(handleArrayOrNullResponse(response), String.class));
}

@Override
public CompletableFuture<GlideString[]> lpopCount(@NonNull GlideString key, long count) {
return commandManager.submitNewCommand(
LPop,
new GlideString[] {key, gs(Long.toString(count))},
response -> castArray(handleArrayResponseBinary(response), GlideString.class));
response -> castArray(handleArrayOrNullResponseBinary(response), GlideString.class));
}

@Override
Expand Down
2 changes: 2 additions & 0 deletions java/integTest/src/test/java/glide/SharedCommandTests.java
Original file line number Diff line number Diff line change
Expand Up @@ -1695,6 +1695,7 @@ public void lpush_lpop_lrange_existing_non_existing_key(BaseClient client) {
assertArrayEquals(new String[] {"value2", "value3"}, client.lpopCount(key, 2).get());
assertArrayEquals(new String[] {}, client.lrange("non_existing_key", 0, -1).get());
assertNull(client.lpop("non_existing_key").get());
assertNull(client.lpopCount("non_existing_key", 2).get());
}

@SneakyThrows
Expand All @@ -1714,6 +1715,7 @@ public void lpush_lpop_lrange_binary_existing_non_existing_key(BaseClient client
new GlideString[] {gs("value2"), gs("value3")}, client.lpopCount(key, 2).get());
assertArrayEquals(new GlideString[] {}, client.lrange(gs("non_existing_key"), 0, -1).get());
assertNull(client.lpop(gs("non_existing_key")).get());
assertNull(client.lpopCount(gs("non_existing_key"), 2).get());
}

@SneakyThrows
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@
import org.apache.commons.lang3.RandomStringUtils;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.Timeout;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.ValueSource;
Comment on lines -26 to -27
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Collateral spotless damage from #3022


@Timeout(10) // seconds
public class StandaloneClientTests {
Expand Down