Merge pull request #29735 from y-yagi/make_sidekiq_and_resque_integration_tests_work_in_ci

Make sidekiq and resque integration tests work in CI
This commit is contained in:
Kasper Timm Hansen 2017-07-10 09:18:14 +02:00 committed by GitHub
commit a35f08f038
2 changed files with 9 additions and 1 deletions

@ -2,7 +2,7 @@
module ResqueJobsManager
def setup
ActiveJob::Base.queue_adapter = :resque
Resque.redis = Redis::Namespace.new "active_jobs_int_test", redis: Redis.connect(url: "redis://127.0.0.1:6379/12", thread_safe: true)
Resque.redis = Redis::Namespace.new "active_jobs_int_test", redis: Redis.connect(url: "redis://:password@127.0.0.1:6379/12", thread_safe: true)
Resque.logger = Rails.logger
unless can_run?
puts "Cannot run integration tests for resque. To be able to run integration tests for resque you need to install and start redis.\n"

@ -4,6 +4,14 @@
require "sidekiq/testing"
Sidekiq::Testing.disable!
Sidekiq.configure_server do |config|
config.redis = { url: "redis://:password@127.0.0.1:6379/12" }
end
Sidekiq.configure_client do |config|
config.redis = { url: "redis://:password@127.0.0.1:6379/12" }
end
module SidekiqJobsManager
def setup
ActiveJob::Base.queue_adapter = :sidekiq