Skip to content

Conversation

@notak
Copy link

@notak notak commented May 3, 2016

No description provided.

@notak
Copy link
Author

notak commented May 3, 2016

Didn't notice the PR from last year to do the same thing. I think from testing that this one implements the correct ordering on pushing multiple elements.

@PC-AKumar
Copy link

I believe this won't work as expected.
The current lpush adds to the end of the list and lpop removes from the end of the list.
To make the rpush and rpop work
a) modifications will have to be made to the lpush and lpop methods to add to the start of the list and remove from the start of the list.
b) rpush should add to the end of the list and remove should get an index of list.size() - 1

@notak
Copy link
Author

notak commented Aug 4, 2016

It would be sensible to do that if you wanted to implement lrange. As it is this works just fine for lpush/lpop/rpush/rpop and I was just aiming for a minimal change set. The project seems to be dead anyway

@PC-AKumar
Copy link

lrange is already implemented in the library, its just not mentioned in the documentation. And yeah, this project is dead, I wonder why... I am sure people still need to mock jedis for their testing.

@xuanyue202
Copy link

I forked a repo and maintain it on the maven central for the rpush/rpop features. Please see https://github.com/xuanyue202/mock-jedis

@cdx-nebiyu
Copy link

Thanks @xuanyue202 for resurrecting the project. Curious if you plan on actively maintaining your fork going forward?

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.

4 participants