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

mock_redis and the mess #62

Closed
phuongnd08 opened this issue Nov 17, 2014 · 3 comments
Closed

mock_redis and the mess #62

phuongnd08 opened this issue Nov 17, 2014 · 3 comments

Comments

@phuongnd08
Copy link
Contributor

We are running into an issue that the test pass on local machine but failed on CircleCI.
Upon close inspection, I can see that between tests the mock_redis instance that SidekiqUniqueJobs is pointing to need to be cleared so that the pre-condition of the spec can be guaranteed.

Though, with the presence of mock_redis, I think it makes the gem complicated and doesn't worth the hassle. Per my opinion, sidekiq-unique-jobs should just use what ever the redis sidekiq is using, even during test mode. This lead to more predictable behavior of the tests cross environments.

@mhenrixon
Copy link
Owner

See here for the background #25 if you can solve that problem AND removing mock_redis feel free to open a new pull request. Specifically watch my answer #25 (comment)

@phuongnd08
Copy link
Contributor Author

Do you think we really need to ensure uniqueness during inline testing?

@mhenrixon
Copy link
Owner

I know I want to at least and others did more than me. If I need to ensure that I only bill a customer once every 30 days I must be able to test this properly or customers might end up getting billed infinite number in a month. I guess turning sidekiq testing off would do this but someone suggested to be able to run sort of integration test without having redis installed which I thought was a valid point.

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

No branches or pull requests

2 participants