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

ruby-changes:21533

From: akr <ko1@a...>
Date: Mon, 31 Oct 2011 19:15:36 +0900 (JST)
Subject: [ruby-changes:21533] akr:r33582 (trunk): * test/resolv/test_dns.rb: don't check maximum sleeped time.

akr	2011-10-31 19:15:27 +0900 (Mon, 31 Oct 2011)

  New Revision: 33582

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

  Log:
    * test/resolv/test_dns.rb: don't check maximum sleeped time.
      ruby doesn't guarantee the maximum time because it is not a
      realtime application.

  Modified files:
    trunk/ChangeLog
    trunk/test/resolv/test_dns.rb

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 33581)
+++ ChangeLog	(revision 33582)
@@ -1,3 +1,9 @@
+Mon Oct 31 19:14:11 2011  Tanaka Akira  <akr@f...>
+
+	* test/resolv/test_dns.rb: don't check maximum sleeped time.
+	  ruby doesn't guarantee the maximum time because it is not a
+	  realtime application.
+
 Mon Oct 31 13:10:06 2011  NAKAMURA Usaku  <usa@r...>
 
 	* win32/win32.c (setfl): extract from fcntl().
Index: test/resolv/test_dns.rb
===================================================================
--- test/resolv/test_dns.rb	(revision 33581)
+++ test/resolv/test_dns.rb	(revision 33582)
@@ -116,7 +116,7 @@
       }
       diff = Time.now - start
       assert rv.empty?, "unexpected: #{rv.inspect} (expected empty)"
-      assert_in_delta 0.1, diff, 0.05
+      assert_operator 0.1, :<=, diff
 
       rv = Resolv::DNS.open(:nameserver_port => [[host, port]]) {|dns|
         dns.timeouts = [ 0.1, 0.2 ]
@@ -125,7 +125,7 @@
       }
       diff = Time.now - start
       assert rv.empty?, "unexpected: #{rv.inspect} (expected empty)"
-      assert_in_delta 0.3, diff, 0.05
+      assert_operator 0.3, :<=, diff
     }
   end
 

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

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