[DRE-commits] [ruby-hiredis] 01/03: Disable networked tests

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 57c4d3656a3c77a125a681c5bcf85a4c27da4191
Author: Apollon Oikonomopoulos <apoikos at debian.org>
Date:   Mon Apr 14 19:57:30 2014 +0300

    Disable networked tests
    
    We disable two network tests using a routable IP address (1.1.1.1) to trigger
    a connection timeout. 1.1.1.1 is not guaranteed to be unroutable, and even in
    that case, connecting to it might yield different results (timeout, connection
    refused, host unreachable).
    
    Closes: #743827
---
 debian/patches/disable-network-tests.patch | 62 ++++++++++++++++++++++++++++++
 debian/patches/series                      |  1 +
 2 files changed, 63 insertions(+)

diff --git a/debian/patches/disable-network-tests.patch b/debian/patches/disable-network-tests.patch
new file mode 100644
index 0000000..5830b6b
--- /dev/null
+++ b/debian/patches/disable-network-tests.patch
@@ -0,0 +1,62 @@
+Author: Apollon Oikonomopoulos <apoikos at debian.org>
+Description: Disable network tests using routable IPs
+ We disable two network tests using a routable IP address (1.1.1.1) to trigger
+ a connection timeout. 1.1.1.1 is not guaranteed to be unroutable, and even in
+ that case, connecting to it might yield different results (timeout, connection
+ refused, host unreachable).
+
+Forwarded: no
+Last-Update: 2014-04-14
+--- a/test/connection_test.rb
++++ b/test/connection_test.rb
+@@ -104,27 +104,30 @@
+     end
+   end
+ 
+-  def test_connect_tcp_with_timeout
+-    hiredis.timeout = 200_000
++  ## The following tests do not work reliably with all possible environments.
++  # Connecting to 1.1.1.1 may - among other things - succeed or yield a
++  # connection refused or host unreachable error.
++  #def test_connect_tcp_with_timeout
++  #  hiredis.timeout = 200_000
++
++  #  t = Time.now
++  #  assert_raise Errno::ETIMEDOUT do
++  #    hiredis.connect("1.1.1.1", 59876)
++  #  end
++
++  #  assert 210_000 > (Time.now - t)
++  #end
++
++  #def test_connect_tcp_with_timeout_override
++  #  hiredis.timeout = 1_000_000
++
++  #  t = Time.now
++  #  assert_raise Errno::ETIMEDOUT do
++  #    hiredis.connect("1.1.1.1", 59876, 200_000)
++  #  end
+ 
+-    t = Time.now
+-    assert_raise Errno::ETIMEDOUT do
+-      hiredis.connect("1.1.1.1", 59876)
+-    end
+-
+-    assert 210_000 > (Time.now - t)
+-  end
+-
+-  def test_connect_tcp_with_timeout_override
+-    hiredis.timeout = 1_000_000
+-
+-    t = Time.now
+-    assert_raise Errno::ETIMEDOUT do
+-      hiredis.connect("1.1.1.1", 59876, 200_000)
+-    end
+-
+-    assert 210_000 > (Time.now - t)
+-  end
++  #  assert 210_000 > (Time.now - t)
++  #end
+ 
+   def test_connect_tcp_without_timeout
+     hiredis.timeout = 0
diff --git a/debian/patches/series b/debian/patches/series
index 65b9f24..0414a2a 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1,3 @@
 use_system_libhiredis.patch
 ruby19.patch
+disable-network-tests.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