summaryrefslogtreecommitdiff
path: root/test/net
diff options
context:
space:
mode:
authorYusuke Endoh <mame@ruby-lang.org>2019-06-25 17:20:01 +0900
committerYusuke Endoh <mame@ruby-lang.org>2019-06-25 17:22:02 +0900
commit1cbc4f987656ac8d8ede6c7cd178ac8e6c2a909b (patch)
tree842ed6fb0985ff4993316ec3ea5ca20d3725ce35 /test/net
parentd7887b05d810e7e3188d25ed91364d5850d92cd7 (diff)
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
Diffstat (limited to 'test/net')
-rw-r--r--test/net/imap/test_imap.rb7
1 files 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