aboutsummaryrefslogtreecommitdiffstats
path: root/actioncable/test/subscription_adapter/evented_redis_test.rb
blob: f316bc46efcbf77121d51e95bc6f4901b0f132e3 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
require "test_helper"
require_relative "./common"

class EventedRedisAdapterTest < ActionCable::TestCase
  include CommonSubscriptionAdapterTest

  def setup
    super

    # em-hiredis is warning-rich
    @previous_verbose, $VERBOSE = $VERBOSE, nil
  end

  def teardown
    super

    # Ensure EM is shut down before we re-enable warnings
    EventMachine.reactor_thread.tap do |thread|
      EventMachine.stop
      thread.join
    end

    $VERBOSE = @previous_verbose
  end

  def cable_config
    { adapter: "evented_redis", url: "redis://127.0.0.1:6379/12" }
  end
end