Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 21 lines (14 sloc) 0.517 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
# encoding: UTF-8

require File.expand_path("./helper", File.dirname(__FILE__))
require "redis/distributed"

setup do
  log = StringIO.new
  init Redis::Distributed.new(NODES, :logger => ::Logger.new(log))
end

test "BRPOP should unset a configured socket timeout" do |r|
  r = Redis::Distributed.new(NODES, :timeout => 1)

  assert_nothing_raised do
    r.brpop("foo", 2)
  end # Errno::EAGAIN raised if socket times out before redis command times out

  assert r.nodes.all? { |node| node.client.timeout == 1 }
end

Something went wrong with that request. Please try again.