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

ruby-changes:62428

From: Jun <ko1@a...>
Date: Thu, 30 Jul 2020 18:28:59 +0900 (JST)
Subject: [ruby-changes:62428] 265968d675 (master): Apply timeout-scale to test_nogvl_poll.

https://git.ruby-lang.org/ruby.git/commit/?id=265968d675

From 265968d675ce6f52a69e5d8ddaa82b41f89a3d2c Mon Sep 17 00:00:00 2001
From: Jun Aruga <jaruga@r...>
Date: Thu, 23 Jul 2020 20:28:58 +0200
Subject: Apply timeout-scale to test_nogvl_poll.


diff --git a/test/fiddle/test_function.rb b/test/fiddle/test_function.rb
index 60168eb..0bb66f9 100644
--- a/test/fiddle/test_function.rb
+++ b/test/fiddle/test_function.rb
@@ -111,7 +111,8 @@ module Fiddle https://github.com/ruby/ruby/blob/trunk/test/fiddle/test_function.rb#L111
       n1 = f.call(nil, 0, msec)
       n2 = th.value
       t1 = Process.clock_gettime(Process::CLOCK_MONOTONIC, :millisecond)
-      assert_in_delta(msec, t1 - t0, 180, 'slept amount of time')
+      delta = EnvUtil.apply_timeout_scale(180)
+      assert_in_delta(msec, t1 - t0, delta, '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
-- 
cgit v0.10.2


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

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