Skip Menu |

This queue is for tickets about the POE-Component-Client-HTTP CPAN distribution.

Report information
The Basics
Id: 41111
Status: resolved
Priority: 0/
Queue: POE-Component-Client-HTTP

People
Owner: Nobody in particular
Requestors: yikes2000 [...] yahoo.com
Cc:
AdminCc:

Bug Information
Severity: Unimportant
Broken in: (no value)
Fixed in: (no value)



Subject: t/57_joel_immed_cancel.t
1..2 ok 1 - timeout on a canceled request DNS: Unexpectedly undefined requests for www.google.com at /usr/local/share/perl/5.8.8/POE/Component/Client/Keepalive.pm line 898. # Looks like you planned 2 tests but ran 1. # Looks like your test exited with 38 just after 1. ------------------------------------------------------------ On one of my VPS partitions, failing this test prevents normal installation (must use 'force' or 'notest' instead).
From: yikes2000 [...] yahoo.com
May I suggest a small change to the test script? Introduce a small delay (0.1 second) to allow the User Agent object to clean up the cancelled request before shutdown. Not sure why this problem only occurs on VPS though... ------------------------------------------------------------ #!perl use strict; use warnings; use HTTP::Request; use Test::More tests => 2; use POE qw(Component::Client::HTTP); POE::Component::Client::HTTP->spawn( Alias => 'ua' ); POE::Session->create( inline_states => { _start => \&client_start, response => \&response_handler, shutdown_ua => \&shutdown_ua, } ); POE::Kernel->run(); pass("nothing died"); exit; sub client_start { my $request = HTTP::Request->new('GET', "http://www.google.com/"); $_[KERNEL]->post( ua => request => response => $request ); $_[KERNEL]->post( ua => cancel => $request ); } sub response_handler { my $response = $_[ARG1][0]; is( $response->code, 408, "timeout on a canceled request" ); $_[KERNEL]->delay( shutdown_ua => 0.1 ); } sub shutdown_ua { $_[KERNEL]->post( ua => "shutdown" ); }
This test has been removed from the distribution, so I guess it won't be annoying you anymore. :)