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

ruby-changes:38821

From: nobu <ko1@a...>
Date: Mon, 15 Jun 2015 08:05:58 +0900 (JST)
Subject: [ruby-changes:38821] nobu:r50902 (trunk): test_require.rb: wait loadig

nobu	2015-06-15 08:05:52 +0900 (Mon, 15 Jun 2015)

  New Revision: 50902

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

  Log:
    test_require.rb: wait loadig
    
    * test/ruby/test_require.rb (test_loading_fifo_threading): wait
      until the main thread blocks by loading.

  Modified files:
    trunk/test/ruby/test_require.rb
Index: test/ruby/test_require.rb
===================================================================
--- test/ruby/test_require.rb	(revision 50901)
+++ test/ruby/test_require.rb	(revision 50902)
@@ -701,7 +701,7 @@ class TestRequire < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_require.rb#L701
       File.mkfifo(f.path)
       assert_separately(["-", f.path], <<-END, timeout: 3)
       th = Thread.current
-      Thread.start {0.1; th.raise(IOError)}
+      Thread.start {begin sleep(0.001) end until th.stop?; th.raise(IOError)}
       assert_raise(IOError) {load(ARGV[0])}
       END
     }

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

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