mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* test/io/nonblock/test_flush.rb: don't set Thread.abort_on_exception.
* test/net/imap/test_imap.rb: ensure disconnecting imap to terminate receiver thread.. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16302 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
3b13714738
commit
786e7aba7f
3 changed files with 24 additions and 7 deletions
|
@ -1,3 +1,10 @@
|
||||||
|
Tue May 6 02:08:18 2008 Tanaka Akira <akr@fsij.org>
|
||||||
|
|
||||||
|
* test/io/nonblock/test_flush.rb: don't set Thread.abort_on_exception.
|
||||||
|
|
||||||
|
* test/net/imap/test_imap.rb: ensure disconnecting imap to terminate
|
||||||
|
receiver thread..
|
||||||
|
|
||||||
Tue May 6 00:29:21 2008 Yukihiro Matsumoto <matz@ruby-lang.org>
|
Tue May 6 00:29:21 2008 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||||
|
|
||||||
* iseq.c (insn_operand_intern): should handle Qundef embedded in
|
* iseq.c (insn_operand_intern): should handle Qundef embedded in
|
||||||
|
|
|
@ -5,7 +5,6 @@ begin
|
||||||
rescue LoadError
|
rescue LoadError
|
||||||
end
|
end
|
||||||
|
|
||||||
Thread.abort_on_exception = true
|
|
||||||
class TestIONonblock < Test::Unit::TestCase
|
class TestIONonblock < Test::Unit::TestCase
|
||||||
def test_flush
|
def test_flush
|
||||||
r,w = IO.pipe
|
r,w = IO.pipe
|
||||||
|
|
|
@ -67,6 +67,7 @@ class IMAPTest < Test::Unit::TestCase
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_starttls
|
def test_starttls
|
||||||
|
imap = nil
|
||||||
if defined?(OpenSSL)
|
if defined?(OpenSSL)
|
||||||
starttls_test do |port|
|
starttls_test do |port|
|
||||||
imap = Net::IMAP.new("localhost", :port => port)
|
imap = Net::IMAP.new("localhost", :port => port)
|
||||||
|
@ -74,6 +75,10 @@ class IMAPTest < Test::Unit::TestCase
|
||||||
imap
|
imap
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
ensure
|
||||||
|
if imap && !imap.disconnected?
|
||||||
|
imap.disconnect
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
|
@ -105,9 +110,12 @@ class IMAPTest < Test::Unit::TestCase
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
begin
|
begin
|
||||||
imap = yield(port)
|
begin
|
||||||
imap.logout
|
imap = yield(port)
|
||||||
imap.disconnect
|
imap.logout
|
||||||
|
ensure
|
||||||
|
imap.disconnect if imap
|
||||||
|
end
|
||||||
ensure
|
ensure
|
||||||
ssl_server.close
|
ssl_server.close
|
||||||
end
|
end
|
||||||
|
@ -143,9 +151,12 @@ class IMAPTest < Test::Unit::TestCase
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
begin
|
begin
|
||||||
imap = yield(port)
|
begin
|
||||||
imap.logout
|
imap = yield(port)
|
||||||
imap.disconnect
|
imap.logout
|
||||||
|
ensure
|
||||||
|
imap.disconnect if imap
|
||||||
|
end
|
||||||
ensure
|
ensure
|
||||||
server.close
|
server.close
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue