diff options
author | Matthew Draper <matthew@trebex.net> | 2017-07-09 03:30:13 +0930 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-07-09 03:30:13 +0930 |
commit | 40a20ded015c92c875c8e96c1687c96303ced7f8 (patch) | |
tree | 6cbc298ba7114bd15a702a9e6fe35e2b7055ba6d /actioncable/test | |
parent | 5c17e34946457b9af428bcf955eb65493257dc3e (diff) | |
parent | 2bce7777b70efe81f45e4ae8dc61b25f1e18771e (diff) | |
download | rails-40a20ded015c92c875c8e96c1687c96303ced7f8.tar.gz rails-40a20ded015c92c875c8e96c1687c96303ced7f8.tar.bz2 rails-40a20ded015c92c875c8e96c1687c96303ced7f8.zip |
Merge pull request #29297 from palkan/fix/action-cable-postgres-identifiers-limit
Fix bug with long stream identifiers when using Postgres adapter
Diffstat (limited to 'actioncable/test')
-rw-r--r-- | actioncable/test/subscription_adapter/common.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/actioncable/test/subscription_adapter/common.rb b/actioncable/test/subscription_adapter/common.rb index 3aa88c2caa..80baf2f771 100644 --- a/actioncable/test/subscription_adapter/common.rb +++ b/actioncable/test/subscription_adapter/common.rb @@ -112,4 +112,18 @@ module CommonSubscriptionAdapterTest assert_equal "two", queue.pop end end + + def test_long_identifiers + channel_1 = "a" * 100 + "1" + channel_2 = "a" * 100 + "2" + subscribe_as_queue(channel_1) do |queue| + subscribe_as_queue(channel_2) do |queue_2| + @tx_adapter.broadcast(channel_1, "apples") + @tx_adapter.broadcast(channel_2, "oranges") + + assert_equal "apples", queue.pop + assert_equal "oranges", queue_2.pop + end + end + end end |