diff --git a/Gemfile.lock b/Gemfile.lock index 2448c528..bb3d948d 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -6,12 +6,12 @@ PATH GEM remote: https://rubygems.org/ specs: - activemodel (7.0.4) - activesupport (= 7.0.4) - activerecord (7.0.4) - activemodel (= 7.0.4) - activesupport (= 7.0.4) - activesupport (7.0.4) + activemodel (7.0.4.1) + activesupport (= 7.0.4.1) + activerecord (7.0.4.1) + activemodel (= 7.0.4.1) + activesupport (= 7.0.4.1) + activesupport (7.0.4.1) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (>= 1.6, < 2) minitest (>= 5.1) @@ -30,8 +30,8 @@ GEM google-protobuf (~> 3.19) googleapis-common-protos-types (~> 1.0) hiredis (0.6.3) - hiredis-client (0.12.0) - redis-client (= 0.12.0) + hiredis-client (0.12.1) + redis-client (= 0.12.1) i18n (1.12.0) concurrent-ruby (~> 1.0) json (2.6.3) @@ -44,7 +44,7 @@ GEM parallel (1.22.1) parser (3.2.0.0) ast (~> 2.4.1) - pry (0.14.1) + pry (0.14.2) coderay (~> 1.1) method_source (~> 1.0) pry-byebug (3.10.1) @@ -54,25 +54,25 @@ GEM rake (13.0.6) rake-compiler (1.2.1) rake - redis (5.0.5) + redis (5.0.6) redis-client (>= 0.9.0) - redis-client (0.12.0) + redis-client (0.12.1) connection_pool regexp_parser (2.6.1) rexml (3.2.5) - rubocop (1.42.0) + rubocop (1.43.0) json (~> 2.3) parallel (~> 1.10) - parser (>= 3.1.2.1) + parser (>= 3.2.0.0) rainbow (>= 2.2.2, < 4.0) regexp_parser (>= 1.8, < 3.0) rexml (>= 3.2.5, < 4.0) rubocop-ast (>= 1.24.1, < 2.0) ruby-progressbar (~> 1.7) - unicode-display_width (>= 1.4.0, < 3.0) + unicode-display_width (>= 2.4.0, < 3.0) rubocop-ast (1.24.1) parser (>= 3.1.1.0) - rubocop-minitest (0.25.1) + rubocop-minitest (0.26.1) rubocop (>= 0.90, < 2.0) rubocop-rake (0.6.0) rubocop (~> 1.0) diff --git a/gemfiles/rails.gemfile.lock b/gemfiles/rails.gemfile.lock index d7ac8a88..9026d4d0 100644 --- a/gemfiles/rails.gemfile.lock +++ b/gemfiles/rails.gemfile.lock @@ -6,12 +6,12 @@ PATH GEM remote: https://rubygems.org/ specs: - activemodel (7.0.4) - activesupport (= 7.0.4) - activerecord (7.0.4) - activemodel (= 7.0.4) - activesupport (= 7.0.4) - activesupport (7.0.4) + activemodel (7.0.4.1) + activesupport (= 7.0.4.1) + activerecord (7.0.4.1) + activemodel (= 7.0.4.1) + activesupport (= 7.0.4.1) + activesupport (7.0.4.1) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (>= 1.6, < 2) minitest (>= 5.1) diff --git a/gemfiles/redis_4.gemfile.lock b/gemfiles/redis_4.gemfile.lock index 49217786..9f3d90a0 100644 --- a/gemfiles/redis_4.gemfile.lock +++ b/gemfiles/redis_4.gemfile.lock @@ -8,8 +8,8 @@ GEM specs: connection_pool (2.3.0) hiredis (0.6.3) - hiredis-client (0.12.0) - redis-client (= 0.12.0) + hiredis-client (0.12.1) + redis-client (= 0.12.1) minitest (5.17.0) mocha (2.0.2) ruby2_keywords (>= 0.0.5) @@ -17,7 +17,7 @@ GEM rake-compiler (1.2.1) rake redis (4.8.0) - redis-client (0.12.0) + redis-client (0.12.1) connection_pool ruby2_keywords (0.0.5) toxiproxy (2.0.2) diff --git a/gemfiles/redis_5.gemfile.lock b/gemfiles/redis_5.gemfile.lock index 9d4cb8b4..6683bd70 100644 --- a/gemfiles/redis_5.gemfile.lock +++ b/gemfiles/redis_5.gemfile.lock @@ -8,17 +8,17 @@ GEM specs: connection_pool (2.3.0) hiredis (0.6.3) - hiredis-client (0.12.0) - redis-client (= 0.12.0) + hiredis-client (0.12.1) + redis-client (= 0.12.1) minitest (5.17.0) mocha (2.0.2) ruby2_keywords (>= 0.0.5) rake (13.0.6) rake-compiler (1.2.1) rake - redis (5.0.5) + redis (5.0.6) redis-client (>= 0.9.0) - redis-client (0.12.0) + redis-client (0.12.1) connection_pool ruby2_keywords (0.0.5) toxiproxy (2.0.2) diff --git a/gemfiles/redis_client.gemfile.lock b/gemfiles/redis_client.gemfile.lock index cc9450ef..49a4ee4f 100644 --- a/gemfiles/redis_client.gemfile.lock +++ b/gemfiles/redis_client.gemfile.lock @@ -1,17 +1,17 @@ GIT remote: https://github.com/redis-rb/redis-client.git - revision: ac1f3bffd9c1cef1e2d46a0dee6dc12b333da229 + revision: df69b9d8341957c190ed4bbd366f6fe2d0fa7cf1 specs: - hiredis-client (0.12.0) - redis-client (= 0.12.0) - redis-client (0.12.0) + hiredis-client (0.12.1) + redis-client (= 0.12.1) + redis-client (0.12.1) connection_pool GIT remote: https://github.com/redis/redis-rb.git - revision: 5a9fb00366c94cb5603b13e903afee58a3e3ee7a + revision: 6dbbc94e48c62ae3607c3a2796b49878dd03c5f9 specs: - redis (5.0.5) + redis (5.0.6) redis-client (>= 0.9.0) PATH diff --git a/test/adapters/grpc_test.rb b/test/adapters/grpc_test.rb index e377cd6a..253cb1b9 100644 --- a/test/adapters/grpc_test.rb +++ b/test/adapters/grpc_test.rb @@ -70,6 +70,7 @@ def test_rpc_server_with_operation def test_unavailable_server_opens_the_circuit GRPC::ActiveCall.any_instance.stubs(:request_response).raises(::GRPC::Unavailable) + ERROR_THRESHOLD.times do assert_raises(::GRPC::Unavailable) do @stub.an_rpc(EchoMsg.new) @@ -204,6 +205,7 @@ def test_bulkheads_tickets_are_working stub1 = build_insecure_stub(EchoStub) stub1.semian_resource.acquire do stub2 = build_insecure_stub(EchoStub, host: "0.0.0.1") + stub2.semian_resource.acquire do assert_raises(GRPC::ResourceBusyError) do stub2.an_rpc(EchoMsg.new) diff --git a/test/adapters/mysql2_test.rb b/test/adapters/mysql2_test.rb index 71cae7d6..d3ecba16 100644 --- a/test/adapters/mysql2_test.rb +++ b/test/adapters/mysql2_test.rb @@ -54,6 +54,7 @@ def test_connection_errors_open_the_circuit def test_query_errors_does_not_open_the_circuit client = connect_to_mysql! + (ERROR_THRESHOLD * 2).times do assert_raises(::Mysql2::Error) do client.query("ERROR!") diff --git a/test/adapters/net_http_test.rb b/test/adapters/net_http_test.rb index 3bdc036f..32aba441 100644 --- a/test/adapters/net_http_test.rb +++ b/test/adapters/net_http_test.rb @@ -111,6 +111,7 @@ def test_bulkheads_tickets_are_working http_1 = Net::HTTP.new(SemianConfig["toxiproxy_upstream_host"], SemianConfig["http_toxiproxy_port"]) http_1.semian_resource.acquire do http_2 = Net::HTTP.new(SemianConfig["toxiproxy_upstream_host"], SemianConfig["http_toxiproxy_port"]) + http_2.semian_resource.acquire do assert_raises(Net::ResourceBusyError) do Net::HTTP.get(URI("http://#{SemianConfig["toxiproxy_upstream_host"]}:#{SemianConfig["http_toxiproxy_port"]}/")) @@ -232,6 +233,7 @@ def test_custom_raw_semian_options_can_only_assign_once semian_configuration_proc = proc do |host, port| DEFAULT_SEMIAN_OPTIONS.merge(name: "#{host}_#{port}") end + with_semian_configuration(semian_configuration_proc) do assert_raises(Semian::NetHTTP::SemianConfigurationChangedError) do Semian::NetHTTP.semian_configuration = semian_configuration_proc @@ -320,6 +322,7 @@ def test_use_custom_configuration_to_combine_endpoints_into_one_resource with_server do open_circuit! end + with_server( ports: [SemianConfig["http_port_service_a"], SemianConfig["http_port_service_b"]], reset_semian_state: false, diff --git a/test/adapters/redis_client_test.rb b/test/adapters/redis_client_test.rb index b3e49031..b00f2158 100644 --- a/test/adapters/redis_client_test.rb +++ b/test/adapters/redis_client_test.rb @@ -94,6 +94,7 @@ def test_connection_reset_does_not_open_the_circuit def test_command_errors_does_not_open_the_circuit client = connect_to_redis! client.call("HSET", "my_hash", "foo", "bar") + (ERROR_THRESHOLD * 2).times do assert_raises(RedisClient::CommandError) do client.call("GET", "my_hash") diff --git a/test/adapters/redis_test.rb b/test/adapters/redis_test.rb index 690cbbfe..cea19250 100644 --- a/test/adapters/redis_test.rb +++ b/test/adapters/redis_test.rb @@ -96,6 +96,7 @@ def test_connection_reset_does_not_open_the_circuit def test_command_errors_does_not_open_the_circuit client = connect_to_redis! client.hset("my_hash", "foo", "bar") + (ERROR_THRESHOLD * 2).times do assert_raises(Redis::CommandError) do client.get("my_hash") diff --git a/test/lru_hash_test.rb b/test/lru_hash_test.rb index 431e937d..aaacaa9c 100644 --- a/test/lru_hash_test.rb +++ b/test/lru_hash_test.rb @@ -172,8 +172,6 @@ def test_monotonically_increasing # At this point, the table looks like: [a, c, b, d, e] assert_equal(notification, payload[:size]) assert_equal(3, payload[:examined]) - else - assert_nil(true) end end