Skip to content

Commit f6b4bf6

Browse files
committed
Shush up EM::Hiredis when running tests.
EM::Hiredis were spewing screenfuls of warnings when running the Action Cable tests. Copied over the technique that shushes up faye-websocket in the client tests, so we can reduce the noise ratio. Note: there's still warnings spewed after tests have finished when EM::Hiredis shuts down. I haven't been able to shush them up yet.
1 parent 30bb2d8 commit f6b4bf6

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

actioncable/test/subscription_adapter/evented_redis_test.rb

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,17 @@
44
class EventedRedisAdapterTest < ActionCable::TestCase
55
include CommonSubscriptionAdapterTest
66

7+
def setup
8+
super
9+
10+
# em-hiredis is warning-rich
11+
@previous_verbose, $VERBOSE = $VERBOSE, nil
12+
end
13+
14+
def teardown
15+
$VERBOSE = @previous_verbose
16+
end
17+
718
def cable_config
819
{ adapter: 'evented_redis', url: 'redis://127.0.0.1:6379/12' }
920
end

0 commit comments

Comments
 (0)