diff --git a/test/lint/streams.rb b/test/lint/streams.rb index 624915f58..6ebf11973 100644 --- a/test/lint/streams.rb +++ b/test/lint/streams.rb @@ -427,7 +427,7 @@ def test_xread_does_not_raise_timeout_error_when_the_block_option_is_zero_msec Thread.pass until prepared redis2 = init _new_client redis2.xadd('s1', { f: 'v1' }, id: '0-1') - thread.join(3) + thread.join assert_equal(['v1'], actual.fetch('s1').map { |i| i.last['f'] }) end diff --git a/test/redis/publish_subscribe_test.rb b/test/redis/publish_subscribe_test.rb index 4deea52cc..195024aeb 100644 --- a/test/redis/publish_subscribe_test.rb +++ b/test/redis/publish_subscribe_test.rb @@ -19,7 +19,7 @@ def teardown end redis.close begin - thread.join(2) or warn("leaked thread") + thread.join rescue RedisClient::ConnectionError end end @@ -296,7 +296,7 @@ def test_unsubscribe_from_another_thread assert_empty @messages @subscribed_redis.unsubscribe # this shouldn't block - refute_nil thread.join(2) + thread.join assert_equal true, @unsubscribed end @@ -329,7 +329,7 @@ def test_subscribe_from_another_thread @subscribed_redis.unsubscribe(channel_name) @subscribed_redis.unsubscribe # this shouldn't block - refute_nil thread.join(2) + thread.join expected = [ ["subscribed", channel_name], ["message", channel_name, "test"],