[前][次][番号順一覧][スレッド一覧]

ruby-changes:73579

From: Takashi <ko1@a...>
Date: Fri, 16 Sep 2022 17:08:07 +0900 (JST)
Subject: [ruby-changes:73579] 6ad6994457 (master): Omit a DRb test on MinGW

https://git.ruby-lang.org/ruby.git/commit/?id=6ad6994457

From 6ad69944572adddaf608aa33e4fdef80100bee08 Mon Sep 17 00:00:00 2001
From: Takashi Kokubun <takashikkbn@g...>
Date: Fri, 16 Sep 2022 17:03:18 +0900
Subject: Omit a DRb test on MinGW

This test seems to leak a thread and let TestIOWait fail:
https://github.com/ruby/ruby/actions/runs/3065426880/jobs/4949517274

DRb almost never seemed to stably work on MinGW. I don't think we intend
to fix it either. We should just omit DRb tests when they fail on MinGW.
---
 test/drb/test_drb.rb | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/test/drb/test_drb.rb b/test/drb/test_drb.rb
index 1ee1b265d0..11e2219bad 100644
--- a/test/drb/test_drb.rb
+++ b/test/drb/test_drb.rb
@@ -335,6 +335,7 @@ end https://github.com/ruby/ruby/blob/trunk/test/drb/test_drb.rb#L335
 
 class TestDRbTCP < Test::Unit::TestCase
   def test_immediate_close
+    omit 'MinGW leaks a thread in this test' if /mingw/ =~ RUBY_PLATFORM
     server = DRb::DRbServer.new('druby://localhost:0')
     host, port, = DRb::DRbTCPSocket.send(:parse_uri, server.uri)
     socket = TCPSocket.open host, port
@@ -345,8 +346,8 @@ class TestDRbTCP < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/drb/test_drb.rb#L346
   ensure
     client&.close
     socket&.close
-    server.stop_service
-    server.thread.join
+    server&.stop_service
+    server&.thread&.join
     DRb::DRbConn.stop_pool
   end
 end
-- 
cgit v1.2.1


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]