Skip to content

Commit

Permalink
Merge pull request #19225 from cristianbica/integration-tests
Browse files Browse the repository at this point in the history
Fixed ActiveJob integration tests
  • Loading branch information
senny committed Mar 6, 2015
2 parents 8a3bd08 + cb78621 commit 90c1050
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Gemfile
Expand Up @@ -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

Expand Down
4 changes: 4 additions & 0 deletions Gemfile.lock
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion activejob/test/support/integration/adapters/qu.rb
Expand Up @@ -3,7 +3,7 @@ def setup
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
Expand Down
4 changes: 3 additions & 1 deletion 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']
Expand All @@ -20,7 +21,8 @@ def clear_jobs
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
Expand Down

0 comments on commit 90c1050

Please sign in to comment.