aboutsummaryrefslogtreecommitdiffstats
path: root/actioncable/test
diff options
context:
space:
mode:
authorMatthew Draper <matthew@trebex.net>2016-02-01 01:30:00 +1030
committerMatthew Draper <matthew@trebex.net>2016-02-01 01:56:47 +1030
commite77368637e17e6a33db2713f651e85a09456c645 (patch)
tree6d62404d3b64969d04d9f70a4c5c9ed44f2253e9 /actioncable/test
parent6162c49e40582bf058a6bb82ccc0cfb8f92332b6 (diff)
downloadrails-e77368637e17e6a33db2713f651e85a09456c645.tar.gz
rails-e77368637e17e6a33db2713f651e85a09456c645.tar.bz2
rails-e77368637e17e6a33db2713f651e85a09456c645.zip
Switch the default redis adapter to a single-stream model
This new adapter does get a little more intimate with the redis-rb gem's implementation than I would like, but it's the least bad of the approaches I've come up with.
Diffstat (limited to 'actioncable/test')
-rw-r--r--actioncable/test/subscription_adapter/evented_redis_test.rb10
-rw-r--r--actioncable/test/subscription_adapter/redis_test.rb8
2 files changed, 17 insertions, 1 deletions
diff --git a/actioncable/test/subscription_adapter/evented_redis_test.rb b/actioncable/test/subscription_adapter/evented_redis_test.rb
new file mode 100644
index 0000000000..70333e51bd
--- /dev/null
+++ b/actioncable/test/subscription_adapter/evented_redis_test.rb
@@ -0,0 +1,10 @@
+require 'test_helper'
+require_relative './common'
+
+class EventedRedisAdapterTest < ActionCable::TestCase
+ include CommonSubscriptionAdapterTest
+
+ def cable_config
+ { adapter: 'evented_redis', url: 'redis://127.0.0.1:6379/12' }
+ end
+end
diff --git a/actioncable/test/subscription_adapter/redis_test.rb b/actioncable/test/subscription_adapter/redis_test.rb
index 8d52832c87..4f34dd86c9 100644
--- a/actioncable/test/subscription_adapter/redis_test.rb
+++ b/actioncable/test/subscription_adapter/redis_test.rb
@@ -5,6 +5,12 @@ class RedisAdapterTest < ActionCable::TestCase
include CommonSubscriptionAdapterTest
def cable_config
- { adapter: 'redis', url: 'redis://127.0.0.1:6379/12' }
+ { adapter: 'redis', driver: 'ruby', url: 'redis://127.0.0.1:6379/12' }
+ end
+end
+
+class RedisAdapterTest::Hiredis < RedisAdapterTest
+ def cable_config
+ super.merge(driver: 'hiredis')
end
end