Open maurercw opened 1 year ago
@maurercw Unfortunately, fakeredis isn't compatible with redis-client and Sidekiq 7 depends on redis-client.
There are more details about redis-client/sidekiq at https://github.com/sds/mock_redis/issues/253 (the issue with fakeredis is exactly the same)
FWIW, depending on what you need in the test env for sidekiq, you can enable inline mode
require 'sidekiq/testing'
Sidekiq::Testing.inline!
Reaching way back here, but back in #66 (almost 10 years ago!) some discussion was happening about how to get fakeredis to work with sidekiq, but I haven't had any luck. It might be related to redis changes moreso than sidekiq, but I'll lay out what I have tried...
Just setting the driver as stated like
redis_details.merge!(:driver => Redis::Connection::Memory) if defined?(Redis::Connection::Memory)
doesn't work as sidekiq's adapter is expecting a symbol:Ok, so I attempt to register the driver myself:
But the redis-client can't initialize the Memory object because the arguments don't line up:
Is there some other way to make this happen, or is the Memory driver no longer compatible?