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

ruby-changes:53489

From: k0kubun <ko1@a...>
Date: Tue, 13 Nov 2018 15:18:00 +0900 (JST)
Subject: [ruby-changes:53489] k0kubun:r65705 (trunk): test_function.rb: loosen delta boundary

k0kubun	2018-11-13 15:17:57 +0900 (Tue, 13 Nov 2018)

  New Revision: 65705

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

  Log:
    test_function.rb: loosen delta boundary
    
    On osx build https://travis-ci.org/ruby/ruby/jobs/454309945,
    
    ```
    1) Failure:
    Fiddle::TestFunction#test_nogvl_poll [/Users/travis/build/ruby/ruby/test/fiddle/test_function.rb:95]:
    slept amount of time.
    Expected |200 - 322| (122) to be <= 100.
    ```
    
    but it succeeds on my macOS machine as is. So it seems that the boundary is
    just too strict and prone to random failure by overload.
    
    To make osx Travis build usable, let me loosen the delta requirement.

  Modified files:
    trunk/test/fiddle/test_function.rb
Index: test/fiddle/test_function.rb
===================================================================
--- test/fiddle/test_function.rb	(revision 65704)
+++ test/fiddle/test_function.rb	(revision 65705)
@@ -92,7 +92,7 @@ module Fiddle https://github.com/ruby/ruby/blob/trunk/test/fiddle/test_function.rb#L92
       n1 = f.call(nil, 0, msec)
       n2 = th.value
       t1 = Process.clock_gettime(Process::CLOCK_MONOTONIC, :millisecond)
-      assert_in_delta(msec, t1 - t0, 100, 'slept amount of time')
+      assert_in_delta(msec, t1 - t0, 150, 'slept amount of time')
       assert_equal(0, n1, perror("poll(2) in main-thread"))
       assert_equal(0, n2, perror("poll(2) in sub-thread"))
     end

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

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