Skip Menu |
 

This queue is for tickets about the AnyEvent-HTTPD CPAN distribution.

Report information
The Basics
Id: 116835
Status: new
Priority: 0/
Queue: AnyEvent-HTTPD

People
Owner: Nobody in particular
Requestors: ONLYJOB [...] cpan.org
Cc: ZARQUON [...] cpan.org
AdminCc:

Bug Information
Severity: Important
Broken in: 0.93
Fixed in: (no value)

Attachments
0001-fix-tests-with-Socket-v2.022-set-default-port.patch



CC: ZARQUON [...] cpan.org
Subject: broken tests with Socket v2.022+ [PATCH]
Download (untitled) / with headers
text/plain 390b
At the moment tests are broken because Socket no longer allows undefined value for port: ~~~~ Undefined port for Socket::pack_sockaddr_in ~~~~ The attached patch fixes tests by setting port to 0. Please review. See also * https://metacpan.org/changes/distribution/Socket * https://rt.cpan.org/Public/Bug/Display.html?id=116624 * https://rt.cpan.org/Public/Bug/Display.html?id=116699
Subject: 0001-fix-tests-with-Socket-v2.022-set-default-port.patch
From 12ae4dbbfbc078d1ca801eb094fe4bf0f6084df9 Mon Sep 17 00:00:00 2001 From: Dmitry Smirnov <onlyjob@member.fsf.org> Date: Thu, 11 Aug 2016 12:09:52 +1000 Subject: [PATCH] fix tests with Socket v2.022; set default port. ~~~~ Undefined port for Socket::pack_sockaddr_in ~~~~ --- t/02_simple_requests.t | 2 +- t/03_keep_alive.t | 2 +- t/05_mp_param.t | 2 +- t/06_long_resp.t | 2 +- t/10_allowed_methods.t | 2 +- t/11_denied_methods.t | 2 +- t/12_head_no_body.t | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/t/02_simple_requests.t b/t/02_simple_requests.t index 3cd5d02..3c72809 100644 --- a/t/02_simple_requests.t +++ b/t/02_simple_requests.t @@ -8,7 +8,7 @@ use AnyEvent::Socket; my $c = AnyEvent->condvar; -my $h = AnyEvent::HTTPD->new; +my $h = AnyEvent::HTTPD->new (port => 0); my $req_url; my $req_hdr; diff --git a/t/03_keep_alive.t b/t/03_keep_alive.t index e1eb21e..052da48 100644 --- a/t/03_keep_alive.t +++ b/t/03_keep_alive.t @@ -8,7 +8,7 @@ use AnyEvent::Socket; my $c = AnyEvent->condvar; -my $h = AnyEvent::HTTPD->new; +my $h = AnyEvent::HTTPD->new (port => 0); my $cnt = 0; diff --git a/t/05_mp_param.t b/t/05_mp_param.t index 48f1622..1edfb53 100644 --- a/t/05_mp_param.t +++ b/t/05_mp_param.t @@ -8,7 +8,7 @@ use AnyEvent::Socket; my $c = AnyEvent->condvar; -my $h = AnyEvent::HTTPD->new; +my $h = AnyEvent::HTTPD->new (port => 0); my %params; diff --git a/t/06_long_resp.t b/t/06_long_resp.t index c2cdd65..8f5f5b2 100644 --- a/t/06_long_resp.t +++ b/t/06_long_resp.t @@ -6,7 +6,7 @@ use AnyEvent; use AnyEvent::HTTPD; use AnyEvent::Socket; -my $h = AnyEvent::HTTPD->new; +my $h = AnyEvent::HTTPD->new (port => 0); my $SEND = "ELMEXBLABLA1235869302893095934";#"ABCDEF" x 1024; my $SENT = $SEND; diff --git a/t/10_allowed_methods.t b/t/10_allowed_methods.t index 557e0f7..8cad9d7 100644 --- a/t/10_allowed_methods.t +++ b/t/10_allowed_methods.t @@ -10,7 +10,7 @@ my ($H, $P); # make sure the default is GET HEAD POST my $c = AnyEvent->condvar; -my $h = AnyEvent::HTTPD->new; +my $h = AnyEvent::HTTPD->new (port => 0); $h->reg_cb ( '' => sub { diff --git a/t/11_denied_methods.t b/t/11_denied_methods.t index 5a4b552..baf89f6 100644 --- a/t/11_denied_methods.t +++ b/t/11_denied_methods.t @@ -10,7 +10,7 @@ my ($H, $P); # allow options, disallow POST my $c = AnyEvent->condvar; -my $h = AnyEvent::HTTPD->new( allowed_methods => [qw/GET HEAD OPTIONS/] ); +my $h = AnyEvent::HTTPD->new( allowed_methods => [qw/GET HEAD OPTIONS/], port => 0 ); $h->reg_cb ( '' => sub { diff --git a/t/12_head_no_body.t b/t/12_head_no_body.t index adeb864..c330b7c 100644 --- a/t/12_head_no_body.t +++ b/t/12_head_no_body.t @@ -6,7 +6,7 @@ use AnyEvent; use AnyEvent::HTTPD; use AnyEvent::Socket; -my $h = AnyEvent::HTTPD->new; +my $h = AnyEvent::HTTPD->new (port => 0); $h->reg_cb ( '/test' => sub { -- 2.8.1


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.