Skip to content

Commit

Permalink
Decrease default timeout in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
pietern committed Apr 16, 2012
1 parent 731e6f8 commit 0e4a2a4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion test/helper.rb
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
end end


PORT = 6381 PORT = 6381
OPTIONS = {:port => PORT, :db => 15, :timeout => 3} OPTIONS = {:port => PORT, :db => 15, :timeout => 0.1}
NODES = ["redis://127.0.0.1:#{PORT}/15"] NODES = ["redis://127.0.0.1:#{PORT}/15"]


def init(redis) def init(redis)
Expand Down
2 changes: 1 addition & 1 deletion test/publish_subscribe_test.rb
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@


test "SUBSCRIBE past a timeout" do |r| test "SUBSCRIBE past a timeout" do |r|
# For some reason, a thread here doesn't reproduce the issue. # For some reason, a thread here doesn't reproduce the issue.
sleep = %{sleep #{OPTIONS[:timeout] + 1}} sleep = %{sleep #{OPTIONS[:timeout] * 2}}
publish = %{echo "publish foo bar\r\n" | nc localhost #{OPTIONS[:port]}} publish = %{echo "publish foo bar\r\n" | nc localhost #{OPTIONS[:port]}}
cmd = [sleep, publish].join("; ") cmd = [sleep, publish].join("; ")


Expand Down

0 comments on commit 0e4a2a4

Please sign in to comment.