From 1cbc4f987656ac8d8ede6c7cd178ac8e6c2a909b Mon Sep 17 00:00:00 2001 From: Yusuke Endoh Date: Tue, 25 Jun 2019 17:20:01 +0900 Subject: [PATCH] test/net/imap/test_imap.rb: use Thread#stop? to wait for server thread Still timeout occurs. Retry for 5dd8fdd3f328f741fae4abba00c478e8a51d2a7e. https://rubyci.org/logs/rubyci.s3.amazonaws.com/unstable11x/ruby-master/log/20190625T032405Z.fail.html.gz --- test/net/imap/test_imap.rb | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/test/net/imap/test_imap.rb b/test/net/imap/test_imap.rb index e33ab2441b..bdae8f28e4 100644 --- a/test/net/imap/test_imap.rb +++ b/test/net/imap/test_imap.rb @@ -130,12 +130,11 @@ class IMAPTest < Test::Unit::TestCase end def start_server - started = false - @threads << Thread.new do - started = true + th = Thread.new do yield end - sleep 0.1 until started + @threads << th + sleep 0.1 until th.stop? end def test_unexpected_eof