-
Notifications
You must be signed in to change notification settings - Fork 45
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
can you support rpush? #24
Comments
The default should be to throw UnsupportedOperationException. |
That sort of defeats the purpose of using a stub. For me a stub that does nothing is more useful than a stub that throws an exception. For what it's worth, I ended up building my own stub instead of using this project. This allows me to run our product with and without redis. Basically all the methods return null and/or do nothing. I appreciate that the goal of this project was to actually fake some behavior, so not the same thing. |
Agree. @idyedov Will you accept PR? |
sure. I was also thinking of any possible ways to use reflections to have a default handler rather than defining them all manually and making sure they're in sync with Jedis across versions etc, but that might be harder |
It's not needed - it is done automatically by jvm, for missing method it throws |
Ups, I was wrong - MockJedis extends Jedis so it is not so simple ... |
Getting a connection refused error currently when I try to call rpush because it is using the inherited method, which is trying to connect to the real thing. In general, it would be nice to override every method and make it do nothing as a default.
I'll fork and send a push request for this.
The text was updated successfully, but these errors were encountered: