aboutsummaryrefslogtreecommitdiffstats
path: root/activejob/test/support
diff options
context:
space:
mode:
Diffstat (limited to 'activejob/test/support')
-rw-r--r--activejob/test/support/integration/adapters/qu.rb2
-rw-r--r--activejob/test/support/integration/adapters/queue_classic.rb4
-rw-r--r--activejob/test/support/integration/test_case_helpers.rb6
3 files changed, 7 insertions, 5 deletions
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
diff --git a/activejob/test/support/integration/test_case_helpers.rb b/activejob/test/support/integration/test_case_helpers.rb
index ee2f6aebea..bed28b2900 100644
--- a/activejob/test/support/integration/test_case_helpers.rb
+++ b/activejob/test/support/integration/test_case_helpers.rb
@@ -5,7 +5,7 @@ module TestCaseHelpers
extend ActiveSupport::Concern
included do
- self.use_transactional_fixtures = false
+ self.use_transactional_tests = false
setup do
clear_jobs
@@ -27,8 +27,8 @@ module TestCaseHelpers
jobs_manager.clear_jobs
end
- def adapter_is?(adapter)
- ActiveJob::Base.queue_adapter.name.split("::").last.gsub(/Adapter$/, '').underscore==adapter.to_s
+ def adapter_is?(adapter_class_symbol)
+ ActiveJob::Base.queue_adapter.class.name.split("::").last.gsub(/Adapter$/, '').underscore == adapter_class_symbol.to_s
end
def wait_for_jobs_to_finish_for(seconds=60)