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

ruby-changes:51562

From: normal <ko1@a...>
Date: Thu, 28 Jun 2018 14:43:39 +0900 (JST)
Subject: [ruby-changes:51562] normal:r63774 (trunk): tests: increase timeouts and speedup some slow tests

normal	2018-06-28 03:27:58 +0900 (Thu, 28 Jun 2018)

  New Revision: 63774

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

  Log:
    tests: increase timeouts and speedup some slow tests
    
    I'm still using the computer from 2005, so enabling MJIT makes
    some tests take longer.  For test_deadlock_by_signal_at_forking
    I got it down to 135s to 89s by disabling RubyGems.

  Modified files:
    trunk/bootstraptest/test_io.rb
    trunk/test/ruby/test_exception.rb
    trunk/test/ruby/test_io.rb
    trunk/test/ruby/test_process.rb
Index: bootstraptest/test_io.rb
===================================================================
--- bootstraptest/test_io.rb	(revision 63773)
+++ bootstraptest/test_io.rb	(revision 63774)
@@ -30,11 +30,11 @@ assert_finish 10, %q{ https://github.com/ruby/ruby/blob/trunk/bootstraptest/test_io.rb#L30
   end
 }, '[ruby-dev:32566]'
 
-assert_finish 1, %q{
+assert_finish 2, %q{
   r, w = IO.pipe
-  Thread.new {
+  Thread.new(Thread.current) { |parent|
     w << "ab"
-    sleep 0.01
+    Thread.pass until parent.stop?
     w << "ab"
   }
   r.gets("abab")
Index: test/ruby/test_io.rb
===================================================================
--- test/ruby/test_io.rb	(revision 63773)
+++ test/ruby/test_io.rb	(revision 63774)
@@ -2685,7 +2685,7 @@ __END__ https://github.com/ruby/ruby/blob/trunk/test/ruby/test_io.rb#L2685
     end;
     10.times.map do
       Thread.start do
-        assert_in_out_err([], src) {|stdout, stderr|
+        assert_in_out_err([], src, timeout: 20) {|stdout, stderr|
           assert_no_match(/hi.*hi/, stderr.join, bug3585)
         }
       end
Index: test/ruby/test_process.rb
===================================================================
--- test/ruby/test_process.rb	(revision 63773)
+++ test/ruby/test_process.rb	(revision 63774)
@@ -2198,7 +2198,7 @@ EOS https://github.com/ruby/ruby/blob/trunk/test/ruby/test_process.rb#L2198
   end
 
   def test_deadlock_by_signal_at_forking
-    assert_separately(["-", RUBY], <<-INPUT, timeout: 80)
+    assert_separately(%W(--disable=gems - #{RUBY}), <<-INPUT, timeout: 100)
       ruby = ARGV.shift
       GC.start # reduce garbage
       GC.disable # avoid triggering CoW after forks
@@ -2206,7 +2206,7 @@ EOS https://github.com/ruby/ruby/blob/trunk/test/ruby/test_process.rb#L2206
       parent = $$
       100.times do |i|
         pid = fork {Process.kill(:QUIT, parent)}
-        IO.popen(ruby, 'r+'){}
+        IO.popen([ruby, -'--disable=gems'], -'r+'){}
         Process.wait(pid)
         $stdout.puts
         $stdout.flush
Index: test/ruby/test_exception.rb
===================================================================
--- test/ruby/test_exception.rb	(revision 63773)
+++ test/ruby/test_exception.rb	(revision 63774)
@@ -1328,7 +1328,7 @@ $stderr = $stdout; raise "\x82\xa0"') do https://github.com/ruby/ruby/blob/trunk/test/ruby/test_exception.rb#L1328
       end
       raise Bug14566
     end;
-    assert_in_out_err([], code, [], /Bug14566/, success: false, timeout: 1)
+    assert_in_out_err([], code, [], /Bug14566/, success: false, timeout: 2)
   end
 
   def test_super_in_method_missing

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

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