diff options
author | Jeremy Daer <jeremydaer@gmail.com> | 2016-04-14 23:04:42 -0700 |
---|---|---|
committer | Jeremy Daer <jeremydaer@gmail.com> | 2016-04-18 23:29:51 -0700 |
commit | 3ba0eec20c79923ee701b13f297cc21a6f0f4a9b (patch) | |
tree | d984b35cb3b53e4279ae213e95d14e524c0f2daf /actioncable/test/client_test.rb | |
parent | 7ad4690b2149fbb23faa179c21698b92ff383c73 (diff) | |
download | rails-3ba0eec20c79923ee701b13f297cc21a6f0f4a9b.tar.gz rails-3ba0eec20c79923ee701b13f297cc21a6f0f4a9b.tar.bz2 rails-3ba0eec20c79923ee701b13f297cc21a6f0f4a9b.zip |
Cable: Extract stream handler construction
* Use separate stream handler builders for easy override and testing.
* Fix worker pool execution that was silently failing since it only
expected connection receivers.
Sparked by code in #24162.
Diffstat (limited to 'actioncable/test/client_test.rb')
-rw-r--r-- | actioncable/test/client_test.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/actioncable/test/client_test.rb b/actioncable/test/client_test.rb index 5ac453db35..fe503fd703 100644 --- a/actioncable/test/client_test.rb +++ b/actioncable/test/client_test.rb @@ -226,7 +226,9 @@ class ClientTest < ActionCable::TestCase assert_equal(1, app.connections.count) assert(app.remote_connections.where(identifier: identifier)) - channel = app.connections.first.subscriptions.send(:subscriptions).first[1] + subscriptions = app.connections.first.subscriptions.send(:subscriptions) + assert_not_equal 0, subscriptions.size, 'Missing EchoChannel subscription' + channel = subscriptions.first[1] channel.expects(:unsubscribed) c.close sleep 0.1 # Data takes a moment to process |