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

Java: Support most RESP3 types #804

Merged
merged 23 commits into from
Jan 22, 2024

Conversation

jonathanl-bq
Copy link
Collaborator

Issue #, if available: N/A

Description of changes:

This PR adds support for RESP3 types, excluding Attribute, Push, and BigNumber, since these are not supported by other wrappers yet and are trickier to implement.

Each type has a Java unit test to check if Redis Values are marshaled into Java values correctly.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@jonathanl-bq jonathanl-bq requested a review from a team as a code owner January 17, 2024 00:51
java/src/lib.rs Show resolved Hide resolved
java/src/ffi_test.rs Show resolved Hide resolved
java/client/src/test/java/glide/ffi/FfiTest.java Outdated Show resolved Hide resolved
java/client/src/test/java/glide/ffi/FfiTest.java Outdated Show resolved Hide resolved
java/client/src/test/java/glide/ffi/FfiTest.java Outdated Show resolved Hide resolved
java/client/src/test/java/glide/ffi/FfiTest.java Outdated Show resolved Hide resolved
java/client/src/test/java/glide/ffi/FfiTest.java Outdated Show resolved Hide resolved
@acarbonetto acarbonetto reopened this Jan 18, 2024
@Yury-Fridlyand Yury-Fridlyand added the java issues and fixes related to the java client label Jan 20, 2024
@ValueSource(strings = {"hello", "cat", "dog"})
public void redisValueToJavaValue_BulkString(String input) {
public void redisValueToJavaValue_BulkString() {
String input = "😀\n💎\n🗿";
Copy link
Contributor

Choose a reason for hiding this comment

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

impeccable choice of emojis!

@jonathanl-bq jonathanl-bq merged commit 47c034d into valkey-io:main Jan 22, 2024
11 checks passed
Yury-Fridlyand added a commit to Bit-Quill/valkey-glide that referenced this pull request Jan 24, 2024
* Implement support for receiving Redis arrays

* Add support for simpler RESP3 types

* Add some unit tests for FFI

* Add more tests and support for VerbatimStrings

* Fix and test Map and Set types

* Add TODO about using conditional compilation flag in a separate test Gradle task

* Remove dependency on ordered_float

* Fix spotless errors

* Attempt to fix CI test failures by updating Gradle task to build Rust

* Update build.gradle to try to fix CI tests again

* Change assertTrue nilValue == null to assertNull

Co-authored-by: Yury-Fridlyand <[email protected]>

* Remove init and teardown

* Parameterize tests

* Update client/build.gradle

* Remove TODO about using primitive integers

* Add tests for casting Redis Ints to Java Integers

* Move FFI testing code to a separate module

* Update build.gradle to use a new task to run FfiTests

* Apply spotless changes

* Address PR comments on FFI tests

* Run spotless with new whitespace changes

---------

Co-authored-by: Yury-Fridlyand <[email protected]>
SanHalacogluImproving pushed a commit to Bit-Quill/valkey-glide that referenced this pull request Jan 25, 2024
* Implement support for receiving Redis arrays

* Add support for simpler RESP3 types

* Add some unit tests for FFI

* Add more tests and support for VerbatimStrings

* Fix and test Map and Set types

* Add TODO about using conditional compilation flag in a separate test Gradle task

* Remove dependency on ordered_float

* Fix spotless errors

* Attempt to fix CI test failures by updating Gradle task to build Rust

* Update build.gradle to try to fix CI tests again

* Change assertTrue nilValue == null to assertNull

Co-authored-by: Yury-Fridlyand <[email protected]>

* Remove init and teardown

* Parameterize tests

* Update client/build.gradle

* Remove TODO about using primitive integers

* Add tests for casting Redis Ints to Java Integers

* Move FFI testing code to a separate module

* Update build.gradle to use a new task to run FfiTests

* Apply spotless changes

* Address PR comments on FFI tests

* Run spotless with new whitespace changes

---------

Co-authored-by: Yury-Fridlyand <[email protected]>
@jonathanl-bq jonathanl-bq deleted the java/integ_lotjonat_resp3_pt1 branch January 30, 2024 13:23
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
None yet
Development

Successfully merging this pull request may close these issues.

4 participants