aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAri Pollak <ajp@aripollak.com>2014-11-28 15:54:47 -0500
committerAri Pollak <ajp@aripollak.com>2014-11-28 17:18:32 -0500
commit2fa4cbeebde4cbaf4fdddb1723960710c67f89a8 (patch)
tree898348952df2002a8e6a48859f9988b1dfa641c0
parent2e4c9c2ee53c29602d3b5c6bc83403d3b48b3f13 (diff)
downloadrails-2fa4cbeebde4cbaf4fdddb1723960710c67f89a8.tar.gz
rails-2fa4cbeebde4cbaf4fdddb1723960710c67f89a8.tar.bz2
rails-2fa4cbeebde4cbaf4fdddb1723960710c67f89a8.zip
Fix Sidekiq ActiveJob integration setup
* .connect on a Redis connection wasn't valid * Reset logger after we're done testing for redis connection to avoid "closed stream" error when starting server for real from a fork
-rw-r--r--activejob/test/support/integration/adapters/sidekiq.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/activejob/test/support/integration/adapters/sidekiq.rb b/activejob/test/support/integration/adapters/sidekiq.rb
index 3cc9a34993..b03a9b81c9 100644
--- a/activejob/test/support/integration/adapters/sidekiq.rb
+++ b/activejob/test/support/integration/adapters/sidekiq.rb
@@ -48,7 +48,8 @@ module SidekiqJobsManager
def can_run?
begin
- Sidekiq.redis { |conn| conn.connect }
+ Sidekiq.redis { |conn| conn.info }
+ Sidekiq.logger = nil
rescue
return false
end