From 2bce7777b70efe81f45e4ae8dc61b25f1e18771e Mon Sep 17 00:00:00 2001 From: palkan Date: Thu, 6 Jul 2017 17:34:05 +0300 Subject: [Fix #28751] Hash stream long stream identifiers when using Postgres adapter --- actioncable/test/subscription_adapter/common.rb | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'actioncable/test/subscription_adapter') 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 -- cgit v1.2.3