summaryrefslogtreecommitdiff
path: root/test/socket/test_socket.rb
diff options
context:
space:
mode:
authoreregon <eregon@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-12-12 18:44:49 +0000
committereregon <eregon@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-12-12 18:44:49 +0000
commit15689ed7780b06ddc14cde4f427de834177283a5 (patch)
treebed64f4fdaf3e1a140642bdd0354384ae286759c /test/socket/test_socket.rb
parent967eab83e333430600926366621aa3a978701c6a (diff)
Fix test-all tests to avoid creating report_on_exception warnings
* The warnings are shown by Thread.report_on_exception defaulting to true. [Feature #14143] [ruby-core:83979] * Improves tests by narrowing down the scope where an exception is expected. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61188 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/socket/test_socket.rb')
-rw-r--r--test/socket/test_socket.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/test/socket/test_socket.rb b/test/socket/test_socket.rb
index 5ee09f8e9d..126f789492 100644
--- a/test/socket/test_socket.rb
+++ b/test/socket/test_socket.rb
@@ -536,13 +536,15 @@ class TestSocket < Test::Unit::TestCase
begin sleep(0.1) end until serv_thread.stop?
sock = TCPSocket.new("localhost", server.addr[1])
client_thread = Thread.new do
- sock.readline
+ assert_raise(IOError, bug4390) {
+ sock.readline
+ }
end
begin sleep(0.1) end until client_thread.stop?
Timeout.timeout(1) do
sock.close
sock = nil
- assert_raise(IOError, bug4390) {client_thread.join}
+ client_thread.join
end
ensure
serv_thread.value.close