diff options
author | Yves Senn <yves.senn@gmail.com> | 2015-03-06 09:28:50 +0100 |
---|---|---|
committer | Yves Senn <yves.senn@gmail.com> | 2015-03-06 09:28:50 +0100 |
commit | 90c10500bec897c99f33bfc71e7481a002a34db2 (patch) | |
tree | 52c909b497e721e6fdd3b1df893e69a0c54c988f | |
parent | 8a3bd0899f50963c0695f69c6a018b4a411e21b9 (diff) | |
parent | cb786219f4cf5f14b9eb8302fb54f3f9c16168cb (diff) | |
download | rails-90c10500bec897c99f33bfc71e7481a002a34db2.tar.gz rails-90c10500bec897c99f33bfc71e7481a002a34db2.tar.bz2 rails-90c10500bec897c99f33bfc71e7481a002a34db2.zip |
Merge pull request #19225 from cristianbica/integration-tests
Fixed ActiveJob integration tests
-rw-r--r-- | Gemfile | 2 | ||||
-rw-r--r-- | Gemfile.lock | 4 | ||||
-rw-r--r-- | activejob/test/support/integration/adapters/qu.rb | 2 | ||||
-rw-r--r-- | activejob/test/support/integration/adapters/queue_classic.rb | 4 |
4 files changed, 9 insertions, 3 deletions
@@ -49,7 +49,7 @@ group :job do gem 'backburner', require: false gem 'qu-rails', github: "bkeepers/qu", branch: "master", require: false gem 'qu-redis', require: false - # gem 'delayed_job_active_record', require: false + gem 'delayed_job_active_record', require: false gem 'sequel', require: false end diff --git a/Gemfile.lock b/Gemfile.lock index e34449a7b0..0dc7559d9e 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -117,6 +117,9 @@ GEM dante (0.1.5) delayed_job (4.0.6) activesupport (>= 3.0, < 5.0) + delayed_job_active_record (4.0.3) + activerecord (>= 3.0, < 5.0) + delayed_job (>= 3.0, < 4.1) erubis (2.7.0) execjs (2.3.0) globalid (0.3.3) @@ -252,6 +255,7 @@ DEPENDENCIES coffee-rails (~> 4.1.0) dalli (>= 2.2.1) delayed_job + delayed_job_active_record jquery-rails! json kindlerb (= 0.1.1) diff --git a/activejob/test/support/integration/adapters/qu.rb b/activejob/test/support/integration/adapters/qu.rb index 3a5b66a057..256ddb3cf3 100644 --- a/activejob/test/support/integration/adapters/qu.rb +++ b/activejob/test/support/integration/adapters/qu.rb @@ -3,7 +3,7 @@ module QuJobsManager require 'qu-rails' require 'qu-redis' ActiveJob::Base.queue_adapter = :qu - ENV['REDISTOGO_URL'] = "tcp://127.0.0.1:6379/12" + ENV['REDISTOGO_URL'] = "redis://127.0.0.1:6379/12" backend = Qu::Backend::Redis.new backend.namespace = "active_jobs_int_test" Qu.backend = backend diff --git a/activejob/test/support/integration/adapters/queue_classic.rb b/activejob/test/support/integration/adapters/queue_classic.rb index 038473ccdc..f522b2711f 100644 --- a/activejob/test/support/integration/adapters/queue_classic.rb +++ b/activejob/test/support/integration/adapters/queue_classic.rb @@ -1,6 +1,7 @@ module QueueClassicJobsManager def setup ENV['QC_DATABASE_URL'] ||= 'postgres:///active_jobs_qc_int_test' + ENV['QC_RAILS_DATABASE'] = 'false' ENV['QC_LISTEN_TIME'] = "0.5" uri = URI.parse(ENV['QC_DATABASE_URL']) user = uri.user||ENV['USER'] @@ -20,7 +21,8 @@ module QueueClassicJobsManager end def start_workers - QC::Conn.disconnect + QC.default_conn_adapter.disconnect + QC.default_conn_adapter = nil @pid = fork do worker = QC::Worker.new(q_name: 'integration_tests') worker.start |