Skip to content

Commit a13e363

Browse files
authored
ci: add a case to the test for the iteration per second (#359)
1 parent 9d394bf commit a13e363

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

test/ips_mget.rb

+9
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,21 @@ def prepare(client)
4444
def bench(cmd, client)
4545
original = [cmd] + Array.new(ATTEMPTS) { |i| "{key}#{i}" }
4646
emulated = [cmd] + Array.new(ATTEMPTS) { |i| "key#{i}" }
47+
single_get = [cmd]
4748

4849
Benchmark.ips do |x|
4950
x.time = 5
5051
x.warmup = 1
5152
x.report("#{cmd}: original") { client.call_v(original) }
5253
x.report("#{cmd}: emulated") { client.call_v(emulated) }
54+
55+
x.report("#{cmd}: single_get") do
56+
ATTEMPTS.times do |i|
57+
single_get[1] = "key#{i}"
58+
client.call_v(single_get)
59+
end
60+
end
61+
5362
x.compare!
5463
end
5564
end

test/redis_client/test_cluster.rb

+3
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,10 @@ def test_transaction_does_not_pointlessly_unwatch_on_success
364364
tx.call('SET', '{key}1', '1')
365365
tx.call('SET', '{key}2', '2')
366366
end
367+
367368
assert_equal(%w[WATCH MULTI SET SET EXEC], @captured_commands.to_a.map(&:command).map(&:first))
369+
370+
wait_for_replication
368371
assert_equal(%w[1 2], @client.call('MGET', '{key}1', '{key}2'))
369372
end
370373

0 commit comments

Comments
 (0)