Skip to content

Commit

Permalink
modern terminology
Browse files Browse the repository at this point in the history
  • Loading branch information
mperham committed Jan 8, 2019
1 parent 1daa32d commit d3fc295
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lib/sidekiq.rb
Expand Up @@ -96,8 +96,8 @@ def self.redis
begin
yield conn
rescue Redis::CommandError => ex
#2550 Failover can cause the server to become a slave, need
# to disconnect and reopen the socket to get back to the master.
#2550 Failover can cause the server to become a replica, need
# to disconnect and reopen the socket to get back to the primary.
(conn.disconnect!; retryable = false; retry) if retryable && ex.message =~ /READONLY/
raise
end
Expand Down
4 changes: 2 additions & 2 deletions test/test_sidekiq.rb
Expand Up @@ -82,7 +82,7 @@ class TestSidekiq < Minitest::Test
it 'does not continually retry' do
assert_raises Redis::CommandError do
Sidekiq.redis do |c|
raise Redis::CommandError, "READONLY You can't write against a read only slave."
raise Redis::CommandError, "READONLY You can't write against a replica."
end
end
end
Expand All @@ -91,7 +91,7 @@ class TestSidekiq < Minitest::Test
counts = []
Sidekiq.redis do |c|
counts << c.info['total_connections_received'].to_i
raise Redis::CommandError, "READONLY You can't write against a read only slave." if counts.size == 1
raise Redis::CommandError, "READONLY You can't write against a replica." if counts.size == 1
end
assert_equal 2, counts.size
assert_equal counts[0] + 1, counts[1]
Expand Down

0 comments on commit d3fc295

Please sign in to comment.