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

ruby-changes:45901

From: mame <ko1@a...>
Date: Wed, 15 Mar 2017 00:14:27 +0900 (JST)
Subject: [ruby-changes:45901] mame:r57974 (trunk): Stop a global server of Rinda test

mame	2017-03-15 00:14:21 +0900 (Wed, 15 Mar 2017)

  New Revision: 57974

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=57974

  Log:
    Stop a global server of Rinda test
    
    This server seemed to cause "leaked file descriptor" warnings.
    Moved it into the setup/teardown framework.

  Modified files:
    trunk/test/rinda/test_rinda.rb
Index: test/rinda/test_rinda.rb
===================================================================
--- test/rinda/test_rinda.rb	(revision 57973)
+++ test/rinda/test_rinda.rb	(revision 57974)
@@ -465,6 +465,7 @@ class TupleSpaceProxyTest < Test::Unit:: https://github.com/ruby/ruby/blob/trunk/test/rinda/test_rinda.rb#L465
     ThreadGroup.new.add(Thread.current)
     @ts_base = Rinda::TupleSpace.new(1)
     @ts = Rinda::TupleSpaceProxy.new(@ts_base)
+    @server = DRb.start_service("druby://localhost:0")
   end
   def teardown
     # implementation-dependent
@@ -474,6 +475,7 @@ class TupleSpaceProxyTest < Test::Unit:: https://github.com/ruby/ruby/blob/trunk/test/rinda/test_rinda.rb#L475
         th.join
       end
     }
+    @server.stop_service
   end
 
   def test_remote_array_and_hash
@@ -531,8 +533,6 @@ class TupleSpaceProxyTest < Test::Unit:: https://github.com/ruby/ruby/blob/trunk/test/rinda/test_rinda.rb#L533
     Process.wait(write) if write && status.nil?
     Process.wait(take)  if take
   end
-
-  @server = DRb.primary_server || DRb.start_service("druby://localhost:0")
 end
 
 module RingIPv6

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

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