Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support hsetnx, watch, type and unlink with GlideString #1641

Merged
merged 11 commits into from
Jun 27, 2024

Conversation

alon-arenberg
Copy link
Collaborator

support hsetnx, watch, type and unlink with GlideString

@alon-arenberg alon-arenberg requested a review from a team as a code owner June 24, 2024 13:49
@Yury-Fridlyand Yury-Fridlyand added the java issues and fixes related to the java client label Jun 24, 2024
Copy link
Collaborator

@Yury-Fridlyand Yury-Fridlyand left a comment

Choose a reason for hiding this comment

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

Add IT

@@ -161,8 +161,10 @@ public void unlink_multiple_keys(BaseClient client) {
setResult = client.set(key3, value).get();
assertEquals(OK, setResult);

Long unlinkedKeysNum = client.unlink(new String[] {key1, key2, key3}).get();
Copy link
Contributor

Choose a reason for hiding this comment

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

As before: add GlideString, without removing String

Copy link
Contributor

@eifrah-aws eifrah-aws left a comment

Choose a reason for hiding this comment

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

Please update the IT to add GS without removing the String version

Comment on lines 315 to 318
GlideString key1 = GlideString.gs("{key}-1" + UUID.randomUUID());
GlideString key2 = GlideString.gs("{key}-2" + UUID.randomUUID());
GlideString key3 = GlideString.gs("{key}-3" + UUID.randomUUID());
GlideString key4 = GlideString.gs("{key}-4" + UUID.randomUUID());
Copy link
Collaborator

Choose a reason for hiding this comment

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

Import gs and shorten all calls

Suggested change
GlideString key1 = GlideString.gs("{key}-1" + UUID.randomUUID());
GlideString key2 = GlideString.gs("{key}-2" + UUID.randomUUID());
GlideString key3 = GlideString.gs("{key}-3" + UUID.randomUUID());
GlideString key4 = GlideString.gs("{key}-4" + UUID.randomUUID());
GlideString key1 = gs("{key}-1" + UUID.randomUUID());
GlideString key2 = gs("{key}-2" + UUID.randomUUID());
GlideString key3 = gs("{key}-3" + UUID.randomUUID());
GlideString key4 = gs("{key}-4" + UUID.randomUUID());

Apply thoughout
See SharedCommandTests.java for reference

@alon-arenberg alon-arenberg merged commit 9312976 into valkey-io:main Jun 27, 2024
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
java issues and fixes related to the java client
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

3 participants