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

Added Incr, IncrBy and IncrByFloat commands. (String Commands) #79

Conversation

SanHalacogluImproving
Copy link

No description provided.

* Update commandmanager to remove optional<route> argument

Signed-off-by: Andrew Carbonetto <[email protected]>

* Java: Add Info commands to client

Signed-off-by: Andrew Carbonetto <[email protected]>

* Clean tests

Signed-off-by: Andrew Carbonetto <[email protected]>

* Fix build.gradle

Signed-off-by: Andrew Carbonetto <[email protected]>

* Update to merge easier

Signed-off-by: Andrew Carbonetto <[email protected]>

* Spotless

Signed-off-by: Andrew Carbonetto <[email protected]>

* Update javadoc for info clustered

Signed-off-by: Andrew Carbonetto <[email protected]>

---------

Signed-off-by: Andrew Carbonetto <[email protected]>
* Java: Add transaction commands

Signed-off-by: Andrew Carbonetto <[email protected]>

* Clean up for review comments

Signed-off-by: Andrew Carbonetto <[email protected]>

* Fix CommandManagerTest.java

Signed-off-by: Andrew Carbonetto <[email protected]>

* All transactions require an argument (empty is fine)

Signed-off-by: Andrew Carbonetto <[email protected]>

* Add IT tests for transactions

Signed-off-by: Andrew Carbonetto <[email protected]>

* Renaming field

Signed-off-by: Andrew Carbonetto <[email protected]>

* Add IT tests for Transactions

Signed-off-by: Andrew Carbonetto <[email protected]>

* Update exec() command with route

Signed-off-by: Andrew Carbonetto <[email protected]>

* Update exec() command with route

Signed-off-by: Andrew Carbonetto <[email protected]>

* Remove failing tests

Signed-off-by: Andrew Carbonetto <[email protected]>

* Spotless

Signed-off-by: Andrew Carbonetto <[email protected]>

* Spotless

Signed-off-by: Andrew Carbonetto <[email protected]>

* Spotless

Signed-off-by: Andrew Carbonetto <[email protected]>

* Update cluster comments

Signed-off-by: Andrew Carbonetto <[email protected]>

---------

Signed-off-by: Andrew Carbonetto <[email protected]>
Signed-off-by: Andrew Carbonetto <[email protected]>
* @see <a href="https://redis.io/commands/incrby/">redis.io</a> for details.
* @param key The key to increment its value.
* @param amount The amount to increment.
* @return The value of <code>key</code> after the increment, An error is raised if <code>key

Choose a reason for hiding this comment

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

Suggested change
* @return The value of <code>key</code> after the increment, An error is raised if <code>key
* @return The value of <code>key</code> after the increment. An error is raised if <code>key

assertEquals(15, client.incrBy(key, 4).get(10, SECONDS));
assertEquals("15", client.get(key).get(10, SECONDS));

assertEquals(20.5, client.incrByFloat(key, 5.5).get(10, SECONDS));

Choose a reason for hiding this comment

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

Suggested change
assertEquals(20.5, client.incrByFloat(key, 5.5).get(10, SECONDS));
assertEquals(20.5, client.incrByFloat(key, 5.5).get());

Remove the timeout calls everywhere. They are not needed.

Choose a reason for hiding this comment

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

I disagree. If something wrong happen, it may hang all rest tests.
An alternate option is to configure junit for test timeout; then we can remove timeouts from get.

@SanHalacogluImproving SanHalacogluImproving force-pushed the java/dev_SanH_add_Incr_IncrBy_IncrByFloat branch from 8b836a5 to 9b74df5 Compare February 13, 2024 00:22
@SanHalacogluImproving SanHalacogluImproving deleted the java/dev_SanH_add_Incr_IncrBy_IncrByFloat branch February 13, 2024 00:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants