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

Checking Sidekiq::Testing.inline? on testing strategy and connector #75

Merged

Conversation

Draiken
Copy link
Contributor

@Draiken Draiken commented Jan 27, 2015

When checking the testing strategy's eligible? method the Sidekiq::Testing.inline? was being checked, but not on the testing connector.

This caused mock_redis to be required even when inline testing was not being used.

Should fix #71

mhenrixon added a commit that referenced this pull request Feb 24, 2015
…e_inline

Checking Sidekiq::Testing.inline? on testing strategy and connector
@mhenrixon mhenrixon merged commit 7b2e619 into mhenrixon:master Feb 24, 2015
@Draiken
Copy link
Contributor Author

Draiken commented Feb 24, 2015

Just a note, since unique jobs uses redis to lock/unlock jobs and gets the connection through sidekiq, the tests involving classes with unique: true will actually try to use redis.

Not sure if this should be in readme or something.

I believe to completely remove this issue, unique jobs should implement a strategy that doesn't actually use redis when inline testing is being used (the same way sidekiq does it).

@felixyz
Copy link

felixyz commented Mar 23, 2015

I needed this patch to get things working without having to modify my test suite – a point release would be great so I don't have to use master! @mhenrixon

(All in all, is it really worth the trouble using mock_redis? Especially since Sidekiq itself has other strategies for isolating tests.)

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.

Sidekiq::Testing inline detection assumes you're always using inline testing
3 participants