[DRE-commits] [ruby-httpclient] 01/01: fix port allocation for servers instantiated in test suite
Antonio Terceiro
terceiro at moszumanska.debian.org
Fri Jun 27 01:11:46 UTC 2014
This is an automated email from the git hooks/post-receive script.
terceiro pushed a commit to branch master
in repository ruby-httpclient.
commit c8a6c6c3b5c1611ed5d513831516fd1c510dc6dc
Author: Antonio Terceiro <terceiro at debian.org>
Date: Thu Jun 26 22:03:47 2014 -0300
fix port allocation for servers instantiated in test suite
---
debian/changelog | 8 +++
debian/control | 2 +-
debian/patches/fix-port-allocation-in-tests.patch | 82 +++++++++++++++++++++++
debian/patches/series | 1 +
4 files changed, 92 insertions(+), 1 deletion(-)
diff --git a/debian/changelog b/debian/changelog
index 2f68011..f4689b7 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+ruby-httpclient (2.3.3-3) unstable; urgency=medium
+
+ * fix-port-allocation-in-tests.patch: fix port allocation for servers
+ instantiated in test suite, which weirdly enough only fail under sbuild
+ (Closes: #747736)
+
+ -- Antonio Terceiro <terceiro at debian.org> Thu, 26 Jun 2014 22:02:27 -0300
+
ruby-httpclient (2.3.3-2) unstable; urgency=low
* Dropped transitional packages now that Wheezy is stable
diff --git a/debian/control b/debian/control
index 76d97b4..a8c28f1 100644
--- a/debian/control
+++ b/debian/control
@@ -4,7 +4,7 @@ Priority: optional
Maintainer: Debian Ruby Extras Maintainers <pkg-ruby-extras-maintainers at lists.alioth.debian.org>
Uploaders: Antonio Terceiro <terceiro at debian.org>, Ryan Niebur <ryanryan52 at gmail.com>, Gunnar Wolf <gwolf at debian.org>
Build-Depends: debhelper (>= 7.0.50~), gem2deb (>= 0.2.7~)
-Standards-Version: 3.9.4
+Standards-Version: 3.9.5
Vcs-Git: git://anonscm.debian.org/pkg-ruby-extras/ruby-httpclient.git
Vcs-Browser: http://anonscm.debian.org/gitweb?p=pkg-ruby-extras/ruby-httpclient.git;a=summary
Homepage: http://github.com/nahi/httpclient
diff --git a/debian/patches/fix-port-allocation-in-tests.patch b/debian/patches/fix-port-allocation-in-tests.patch
new file mode 100644
index 0000000..194fe07
--- /dev/null
+++ b/debian/patches/fix-port-allocation-in-tests.patch
@@ -0,0 +1,82 @@
+Description: Fix port allocation on test suite
+ 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
+
+--- a/test/helper.rb
++++ b/test/helper.rb
+@@ -69,7 +69,7 @@ module Helper
+ @proxyserver = WEBrick::HTTPProxyServer.new(
+ :BindAddress => "localhost",
+ :Logger => @proxylogger,
+- :Port => 0,
++ :Port => 50001,
+ :AccessLog => []
+ )
+ @proxyport = @proxyserver.config[:Port]
+--- a/test/test_auth.rb
++++ b/test/test_auth.rb
+@@ -17,7 +17,7 @@ class TestAuth < Test::Unit::TestCase
+ @server = WEBrick::HTTPServer.new(
+ :BindAddress => "localhost",
+ :Logger => @logger,
+- :Port => 0,
++ :Port => 50000,
+ :AccessLog => [],
+ :DocumentRoot => File.dirname(File.expand_path(__FILE__))
+ )
+@@ -68,7 +68,7 @@ class TestAuth < Test::Unit::TestCase
+ :ProxyAuthProc => @proxy_digest_auth.method(:authenticate).to_proc,
+ :BindAddress => "localhost",
+ :Logger => @proxylogger,
+- :Port => 0,
++ :Port => 50001,
+ :AccessLog => []
+ )
+ @proxyport = @proxyserver.config[:Port]
+--- a/test/test_http-access2.rb
++++ b/test/test_http-access2.rb
+@@ -386,7 +386,7 @@ private
+ @server = WEBrick::HTTPServer.new(
+ :BindAddress => "localhost",
+ :Logger => @logger,
+- :Port => 0,
++ :Port => 50000,
+ :AccessLog => [],
+ :DocumentRoot => File.dirname(File.expand_path(__FILE__))
+ )
+--- a/test/test_httpclient.rb
++++ b/test/test_httpclient.rb
+@@ -1599,7 +1599,7 @@ private
+ @server = WEBrick::HTTPServer.new(
+ :BindAddress => "localhost",
+ :Logger => @logger,
+- :Port => 0,
++ :Port => 50000,
+ :AccessLog => [],
+ :DocumentRoot => File.dirname(File.expand_path(__FILE__))
+ )
+--- a/test/test_ssl.rb
++++ b/test/test_ssl.rb
+@@ -186,7 +186,7 @@ private
+ @server = WEBrick::HTTPServer.new(
+ :BindAddress => "localhost",
+ :Logger => logger,
+- :Port => 0,
++ :Port => 50000,
+ :AccessLog => [],
+ :DocumentRoot => DIR,
+ :SSLEnable => true,
diff --git a/debian/patches/series b/debian/patches/series
index 8eae358..bd3aa20 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
0001-Remove-Hash-element-order-dependency.patch
+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