2016-08-06 13:15:15 -04:00
|
|
|
require "test_helper"
|
|
|
|
require_relative "./common"
|
2016-01-31 10:00:00 -05:00
|
|
|
|
|
|
|
class EventedRedisAdapterTest < ActionCable::TestCase
|
|
|
|
include CommonSubscriptionAdapterTest
|
|
|
|
|
2016-03-26 06:52:07 -04:00
|
|
|
def setup
|
|
|
|
super
|
|
|
|
|
|
|
|
# em-hiredis is warning-rich
|
|
|
|
@previous_verbose, $VERBOSE = $VERBOSE, nil
|
|
|
|
end
|
|
|
|
|
|
|
|
def teardown
|
2016-10-01 20:31:30 -04:00
|
|
|
super
|
|
|
|
|
|
|
|
# Ensure EM is shut down before we re-enable warnings
|
|
|
|
EventMachine.reactor_thread.tap do |thread|
|
|
|
|
EventMachine.stop
|
|
|
|
thread.join
|
|
|
|
end
|
|
|
|
|
2016-03-26 06:52:07 -04:00
|
|
|
$VERBOSE = @previous_verbose
|
|
|
|
end
|
|
|
|
|
2016-01-31 10:00:00 -05:00
|
|
|
def cable_config
|
2016-08-06 13:15:15 -04:00
|
|
|
{ adapter: "evented_redis", url: "redis://127.0.0.1:6379/12" }
|
2016-01-31 10:00:00 -05:00
|
|
|
end
|
|
|
|
end
|