[DRE-commits] [ruby-hiredis] 02/03: Disable test_no_eagain_after_cumulative_wait_exceeds_timeout

Apollon Oikonomopoulos apoikos at moszumanska.debian.org
Wed May 7 10:51:25 UTC 2014


This is an automated email from the git hooks/post-receive script.

apoikos pushed a commit to branch master
in repository ruby-hiredis.

commit eff83c49ef439fd910aff739c971a730d423208f
Author: Apollon Oikonomopoulos <apoikos at debian.org>
Date:   Mon Apr 14 20:18:17 2014 +0300

    Disable test_no_eagain_after_cumulative_wait_exceeds_timeout
    
    This test is probably too time-sensitive and yields different results
    across different kernels (seems to work reliably only on Linux).
---
 debian/patches/disable-no-eagain-test.patch | 75 +++++++++++++++++++++++++++++
 debian/patches/series                       |  1 +
 2 files changed, 76 insertions(+)

diff --git a/debian/patches/disable-no-eagain-test.patch b/debian/patches/disable-no-eagain-test.patch
new file mode 100644
index 0000000..173a6a5
--- /dev/null
+++ b/debian/patches/disable-no-eagain-test.patch
@@ -0,0 +1,75 @@
+Author: Apollon Oikonomopoulos <apoikos at debian.org>
+Description: Disable test_no_eagain_after_cumulative_wait_exceeds_timeout
+ This test is probably too time-sensitive and yields different results across
+ different kernels (seems to work reliably only on Linux).
+
+Forwarded: no
+Last-Update: 2014-04-14
+
+--- a/test/connection_test.rb
++++ b/test/connection_test.rb
+@@ -315,35 +315,37 @@
+     end
+   end
+ 
+-  def test_no_eagain_after_cumulative_wait_exceeds_timeout
+-    listen do |server|
+-      hiredis.connect("localhost", 6380)
+-      hiredis.timeout = 10_000
++  # The following test seems to be too sensitive wrt to timing and gives
++  # unstable results across operating systems.
++  #def test_no_eagain_after_cumulative_wait_exceeds_timeout
++  #  listen do |server|
++  #    hiredis.connect("localhost", 6380)
++  #    hiredis.timeout = 10_000
+ 
+-      begin
+-        thread = Thread.new do
+-          loop do
+-            sleep(0.001)
+-            server.write("+ok\r\n")
+-          end
+-        end
++  #    begin
++  #      thread = Thread.new do
++  #        loop do
++  #          sleep(0.001)
++  #          server.write("+ok\r\n")
++  #        end
++  #      end
+ 
+-        # The read timeout for this connection is 10 milliseconds.
+-        # To compensate for the overhead of parsing the reply and the chance
+-        # not having to wait because the reply is already present in the OS
+-        # buffers, continue until we have waited at least 5x the timeout.
+-        waited = 0
+-        while waited < 50_000
+-          t1 = Time.now
+-          hiredis.read
+-          t2 = Time.now
+-          waited += (t2 - t1) * 1_000_000
+-        end
+-      ensure
+-        thread.kill
+-      end
+-    end
+-  end
++  #      # The read timeout for this connection is 10 milliseconds.
++  #      # To compensate for the overhead of parsing the reply and the chance
++  #      # not having to wait because the reply is already present in the OS
++  #      # buffers, continue until we have waited at least 5x the timeout.
++  #      waited = 0
++  #      while waited < 50_000
++  #        t1 = Time.now
++  #        hiredis.read
++  #        t2 = Time.now
++  #        waited += (t2 - t1) * 1_000_000
++  #      end
++  #    ensure
++  #      thread.kill
++  #    end
++  #  end
++  #end
+ end
+ 
+ if defined?(Hiredis::Ruby::Connection)
diff --git a/debian/patches/series b/debian/patches/series
index 0414a2a..b6ab297 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,4 @@
 use_system_libhiredis.patch
 ruby19.patch
 disable-network-tests.patch
+disable-no-eagain-test.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/ruby-hiredis.git



More information about the Pkg-ruby-extras-commits mailing list