Skip to content

Commit

Permalink
ci: appease rubocop (#303)
Browse files Browse the repository at this point in the history
  • Loading branch information
supercaracal authored Dec 12, 2023
1 parent e52cf5d commit f135ec0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion test/ips_concurrent_worker.rb
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def bench(duration, **kwargs)
end

sum = 0
group.each do |_, n|
group.each do |_, n| # rubocop:disable Style/HashEachMethods
sum += n
end

Expand Down
8 changes: 4 additions & 4 deletions test/redis_client/cluster/concurrent_worker/mixin.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def test_work_group
want = Array.new(size) { |i| i * 2 }
got = []

group.each do |_, v|
group.each do |_, v| # rubocop:disable Style/HashEachMethods
got << v
end

Expand All @@ -36,7 +36,7 @@ def test_too_many_tasks
5.times { |i| group.push(i, i) { |n| n } }
assert_raises(InvalidNumberOfTasks) { group.push(5, 5) { |n| n } }
sum = 0
group.each { |_, v| sum += v }
group.each { |_, v| sum += v } # rubocop:disable Style/HashEachMethods
assert_equal(10, sum)
group.close
end
Expand All @@ -45,9 +45,9 @@ def test_fewer_tasks
group = @worker.new_group(size: 5)
4.times { |i| group.push(i, i) { |n| n } }
sum = 0
assert_raises(InvalidNumberOfTasks) { group.each { |_, v| sum += v } }
assert_raises(InvalidNumberOfTasks) { group.each { |_, v| sum += v } } # rubocop:disable Style/HashEachMethods
group.push(4, 4) { |n| n }
group.each { |_, v| sum += v }
group.each { |_, v| sum += v } # rubocop:disable Style/HashEachMethods
assert_equal(10, sum)
group.close
end
Expand Down

0 comments on commit f135ec0

Please sign in to comment.