Skip to content

Commit

Permalink
Tidy up spec, fix timeout when running with coverage.
Browse files Browse the repository at this point in the history
  • Loading branch information
ioquatix committed Feb 21, 2019
1 parent 9eb37c6 commit 880aada
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions spec/async/redis/client_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -81,15 +81,16 @@
client.close
end

it "retrieves large responses from redis" do
num_elems = 5000
it "retrieves large responses from redis", timeout: 30 do
count = 5000

client.call("DEL", list_key)
num_elems.times { |i| client.call("RPUSH", list_key, i) }

response = client.call("LRANGE", list_key, 0, num_elems - 1)

expect(response).to eq (0...num_elems).map(&:to_s)

count.times {|i| client.call("RPUSH", list_key, i) }
response = client.call("LRANGE", list_key, 0, count - 1)
expect(response).to eq (0...count).map(&:to_s)
client.close
end
end

0 comments on commit 880aada

Please sign in to comment.