Skip to content
This repository

Testing sidekiq at Sidekiq::Client level #713

Closed
NielsKSchjoedt opened this Issue · 3 comments

3 participants

NielsKSchjoedt Mike Perham João Daniel
NielsKSchjoedt

Is it just me, or wouldn't it be better to have this https://github.com/mperham/sidekiq/blob/master/lib/sidekiq/testing.rb implemented at the Sidekiq::Client level instead https://github.com/mperham/sidekiq/blob/master/lib/sidekiq/client.rb ?

Think about the situation where you call Sidekiq::Client.push in your code - or just use the resque compatibility helpers...

Mike Perham
Owner

Yeah, we should probably just have testing helpers which override Sidekiq::Client.raw_push. The Client impl has been refactored over the last year - it wasn't totally stable - so this is possible now. Probably something for Sidekiq 3.0 since I'm sure it will break some people's testing code.

João Daniel

@NielsKSchjoedt did you write some code in this direction? I'm having problems to retrieve :jid from client_push method override by sidekiq/testing. It always returns true.

NielsKSchjoedt

No sorry, I didn't :-(

Mike Perham mperham closed this issue from a commit
Mike Perham Update sidekiq/testing to execute almost all of the client api, fixes #…
…713

This should ensure tests reproduce a maximum amount of the implementation details that you'll see in production.
07a2781
Mike Perham mperham closed this in 07a2781
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.