[DRE-commits] [ruby-httpclient] 05/18: Refresh patch fix-port-allocation-in-tests.patch
Hleb Valoshka
tsfgnu-guest at moszumanska.debian.org
Thu Aug 27 10:37:13 UTC 2015
This is an automated email from the git hooks/post-receive script.
tsfgnu-guest pushed a commit to branch master
in repository ruby-httpclient.
commit c8635a1eb4d4c581343ef833158d7b5f00d22690
Author: Hleb Valoshka <375gnu at gmail.com>
Date: Mon Aug 17 16:04:13 2015 +0300
Refresh patch fix-port-allocation-in-tests.patch
---
...tch => 0001-Fix-port-allocation-in-tests.patch} | 41 ++++++++++++++--------
debian/patches/series | 2 +-
2 files changed, 28 insertions(+), 15 deletions(-)
diff --git a/debian/patches/fix-port-allocation-in-tests.patch b/debian/patches/0001-Fix-port-allocation-in-tests.patch
similarity index 69%
rename from debian/patches/fix-port-allocation-in-tests.patch
rename to debian/patches/0001-Fix-port-allocation-in-tests.patch
index 194fe07..f7e5f57 100644
--- a/debian/patches/fix-port-allocation-in-tests.patch
+++ b/debian/patches/0001-Fix-port-allocation-in-tests.patch
@@ -1,21 +1,26 @@
-Description: Fix port allocation on test suite
+From: Antonio Terceiro <terceiro at debian.org>
+Date: Mon, 17 Aug 2015 12:51:37 +0300
+Subject: Fix port allocation in tests
+
For some reason, when running the test suite under sbuild, several tests crash
with an error of `Errno::EADDRINUSE: Address already in use - listen(2)`. The
tests just work when building outside of sbuild.
- .
+
Somehow, passing :Port => 0 seems to be making WEBrick allocate the same port
over and over. I couldn't reproduce this interactively.
- .
+
This patch fixes the issue by assigning explict port numbers to servers and
proxy servers created in the test suite, and is most probably Debian-specific.
-Author: Antonio Terceiro <terceiro at debian.org>
-
---
-Origin: vendor
-Bug-Debian: http://bugs.debian.org/747736
-Forwarded: not-needed
-Last-Update: 2014-06-26
+ test/helper.rb | 2 +-
+ test/test_auth.rb | 4 ++--
+ test/test_http-access2.rb | 2 +-
+ test/test_httpclient.rb | 2 +-
+ test/test_ssl.rb | 2 +-
+ 5 files changed, 6 insertions(+), 6 deletions(-)
+diff --git a/test/helper.rb b/test/helper.rb
+index 0cd4c90..d89fa13 100644
--- a/test/helper.rb
+++ b/test/helper.rb
@@ -69,7 +69,7 @@ module Helper
@@ -27,9 +32,11 @@ Last-Update: 2014-06-26
:AccessLog => []
)
@proxyport = @proxyserver.config[:Port]
+diff --git a/test/test_auth.rb b/test/test_auth.rb
+index 156d2f1..7d1fdba 100644
--- a/test/test_auth.rb
+++ b/test/test_auth.rb
-@@ -17,7 +17,7 @@ class TestAuth < Test::Unit::TestCase
+@@ -21,7 +21,7 @@ class TestAuth < Test::Unit::TestCase
@server = WEBrick::HTTPServer.new(
:BindAddress => "localhost",
:Logger => @logger,
@@ -38,7 +45,7 @@ Last-Update: 2014-06-26
:AccessLog => [],
:DocumentRoot => File.dirname(File.expand_path(__FILE__))
)
-@@ -68,7 +68,7 @@ class TestAuth < Test::Unit::TestCase
+@@ -88,7 +88,7 @@ class TestAuth < Test::Unit::TestCase
:ProxyAuthProc => @proxy_digest_auth.method(:authenticate).to_proc,
:BindAddress => "localhost",
:Logger => @proxylogger,
@@ -47,9 +54,11 @@ Last-Update: 2014-06-26
:AccessLog => []
)
@proxyport = @proxyserver.config[:Port]
+diff --git a/test/test_http-access2.rb b/test/test_http-access2.rb
+index 04080ed..23a941f 100644
--- a/test/test_http-access2.rb
+++ b/test/test_http-access2.rb
-@@ -386,7 +386,7 @@ private
+@@ -385,7 +385,7 @@ private
@server = WEBrick::HTTPServer.new(
:BindAddress => "localhost",
:Logger => @logger,
@@ -58,9 +67,11 @@ Last-Update: 2014-06-26
:AccessLog => [],
:DocumentRoot => File.dirname(File.expand_path(__FILE__))
)
+diff --git a/test/test_httpclient.rb b/test/test_httpclient.rb
+index f65fe9c..b45deb1 100644
--- a/test/test_httpclient.rb
+++ b/test/test_httpclient.rb
-@@ -1599,7 +1599,7 @@ private
+@@ -1821,7 +1821,7 @@ private
@server = WEBrick::HTTPServer.new(
:BindAddress => "localhost",
:Logger => @logger,
@@ -69,9 +80,11 @@ Last-Update: 2014-06-26
:AccessLog => [],
:DocumentRoot => File.dirname(File.expand_path(__FILE__))
)
+diff --git a/test/test_ssl.rb b/test/test_ssl.rb
+index 4ac45cf..c12f9e2 100644
--- a/test/test_ssl.rb
+++ b/test/test_ssl.rb
-@@ -186,7 +186,7 @@ private
+@@ -207,7 +207,7 @@ private
@server = WEBrick::HTTPServer.new(
:BindAddress => "localhost",
:Logger => logger,
diff --git a/debian/patches/series b/debian/patches/series
index 62e76a9..9760cdf 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1 @@
-fix-port-allocation-in-tests.patch
+0001-Fix-port-allocation-in-tests.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/ruby-httpclient.git
More information about the Pkg-ruby-extras-commits
mailing list