r49788 - in /branches/upstream/libpoe-test-loops-perl/current: CHANGES META.yml lib/POE/Test/Loops.pm lib/POE/Test/Loops/comp_tcp_concurrent.pm lib/POE/Test/Loops/connect_errors.pm lib/POE/Test/Loops/wheel_tail.pm
jawnsy-guest at users.alioth.debian.org
jawnsy-guest at users.alioth.debian.org
Fri Jan 1 20:38:35 UTC 2010
Author: jawnsy-guest
Date: Fri Jan 1 20:38:30 2010
New Revision: 49788
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=49788
Log:
[svn-upgrade] Integrating new upstream version, libpoe-test-loops-perl (1.031)
Modified:
branches/upstream/libpoe-test-loops-perl/current/CHANGES
branches/upstream/libpoe-test-loops-perl/current/META.yml
branches/upstream/libpoe-test-loops-perl/current/lib/POE/Test/Loops.pm
branches/upstream/libpoe-test-loops-perl/current/lib/POE/Test/Loops/comp_tcp_concurrent.pm
branches/upstream/libpoe-test-loops-perl/current/lib/POE/Test/Loops/connect_errors.pm
branches/upstream/libpoe-test-loops-perl/current/lib/POE/Test/Loops/wheel_tail.pm
Modified: branches/upstream/libpoe-test-loops-perl/current/CHANGES
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libpoe-test-loops-perl/current/CHANGES?rev=49788&op=diff
==============================================================================
--- branches/upstream/libpoe-test-loops-perl/current/CHANGES (original)
+++ branches/upstream/libpoe-test-loops-perl/current/CHANGES Fri Jan 1 20:38:30 2010
@@ -1,3 +1,33 @@
+=====================================
+2010-01-01T08:57:09.665997Z ptl-1_031
+=====================================
+
+ 2010-01-01 08:53:54 (r2769) by rcaputo
+ poe-test-loops/lib/POE/Test/Loops.pm M
+
+ Prepare for release.
+
+ 2009-12-27 09:56:05 (r2763) by rcaputo
+ poe-test-loops/lib/POE/Test/Loops/wheel_tail.pm M
+
+ Check for initial reset on delayed open.
+
+ 2009-12-26 22:32:43 (r2758) by rcaputo
+ poe-test-loops/lib/POE/Test/Loops/wheel_tail.pm M
+
+ Clarify FollowTail debugging messages.
+
+ 2009-12-26 09:19:55 (r2756) by rcaputo
+ poe-test-loops/lib/POE/Test/Loops/connect_errors.pm M
+
+ Unfortunately we can't test connect errors on Windows. Behavior seems
+ to vacillate from one version of ActivePerl to another.
+
+ 2009-12-26 08:50:19 (r2755) by rcaputo
+ poe-test-loops/lib/POE/Test/Loops/wheel_tail.pm M
+
+ Resolve a line ending issue that caused false failures in Windows.
+
=====================================
2009-10-14T04:25:48.467603Z ptl-1_030
=====================================
Modified: branches/upstream/libpoe-test-loops-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libpoe-test-loops-perl/current/META.yml?rev=49788&op=diff
==============================================================================
--- branches/upstream/libpoe-test-loops-perl/current/META.yml (original)
+++ branches/upstream/libpoe-test-loops-perl/current/META.yml Fri Jan 1 20:38:30 2010
@@ -1,6 +1,6 @@
--- #YAML:1.0
name: POE-Test-Loops
-version: 1.030
+version: 1.031
abstract: POE::Loop test suite
author:
- Rocco Caputo <rcaputo at cpan.org>
Modified: branches/upstream/libpoe-test-loops-perl/current/lib/POE/Test/Loops.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libpoe-test-loops-perl/current/lib/POE/Test/Loops.pm?rev=49788&op=diff
==============================================================================
--- branches/upstream/libpoe-test-loops-perl/current/lib/POE/Test/Loops.pm (original)
+++ branches/upstream/libpoe-test-loops-perl/current/lib/POE/Test/Loops.pm Fri Jan 1 20:38:30 2010
@@ -1,4 +1,4 @@
-# $Id: Loops.pm 2744 2009-10-14 04:24:18Z rcaputo $
+# $Id: Loops.pm 2769 2010-01-01 08:53:54Z rcaputo $
package POE::Test::Loops;
@@ -6,8 +6,8 @@
use vars qw($VERSION);
use vars qw($VERSION $REVISION);
-$VERSION = '1.030'; # NOTE - Should be #.### (three decimal places)
-$REVISION = do {my($r)=(q$Revision: 2744 $=~/(\d+)/);sprintf"0.%04d",$r};
+$VERSION = '1.031'; # NOTE - Should be #.### (three decimal places)
+$REVISION = do {my($r)=(q$Revision: 2769 $=~/(\d+)/);sprintf"0.%04d",$r};
use File::Spec;
use File::Path;
Modified: branches/upstream/libpoe-test-loops-perl/current/lib/POE/Test/Loops/comp_tcp_concurrent.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libpoe-test-loops-perl/current/lib/POE/Test/Loops/comp_tcp_concurrent.pm?rev=49788&op=diff
==============================================================================
--- branches/upstream/libpoe-test-loops-perl/current/lib/POE/Test/Loops/comp_tcp_concurrent.pm (original)
+++ branches/upstream/libpoe-test-loops-perl/current/lib/POE/Test/Loops/comp_tcp_concurrent.pm Fri Jan 1 20:38:30 2010
@@ -53,6 +53,7 @@
# program's devising.
POE::Component::Server::TCP->new(
Port => 0,
+ Address => '127.0.0.1',
Alias => 'acceptor_server',
Concurrency => 1,
Started => sub {
@@ -137,6 +138,7 @@
# of a user-defined session.
POE::Component::Server::TCP->new(
Port => 0,
+ Address => '127.0.0.1',
Alias => 'callback_server',
Started => sub {
use Socket qw(sockaddr_in);
Modified: branches/upstream/libpoe-test-loops-perl/current/lib/POE/Test/Loops/connect_errors.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libpoe-test-loops-perl/current/lib/POE/Test/Loops/connect_errors.pm?rev=49788&op=diff
==============================================================================
--- branches/upstream/libpoe-test-loops-perl/current/lib/POE/Test/Loops/connect_errors.pm (original)
+++ branches/upstream/libpoe-test-loops-perl/current/lib/POE/Test/Loops/connect_errors.pm Fri Jan 1 20:38:30 2010
@@ -13,10 +13,11 @@
plan skip_all => "Network access (and permission) required to run this test";
}
-# to work around an issue on MSWin32+ActiveState 5.6.1
-# it will always timeout via our alarm, and if we remove it - the OS never times out!
-if ($^O eq 'MSWin32' and $] < 5.008) {
- plan skip_all => "This test always fails on MSWin32+perl older than 5.8.0";
+# MSWin32+ActiveState 5.6.1 and 5.10.1 always time out. And if we remove the
+# delay, then the OS never times out. 5.8.0 seems to work fine. Since this
+# behavior seems to come and go, we're skipping it for all versions of MSWin32.
+if ($^O eq 'MSWin32') {
+ plan skip_all => "This test fails for various versions of MSWin32 perl";
}
plan tests => 3;
@@ -31,13 +32,13 @@
use POE qw( Wheel::ReadWrite Component::Client::TCP );
# Dynamically find an unused port for the failure-to-connect test.
+# Listen on the port, but accept no connections there.
my $unused_port;
{
use IO::Socket::INET;
my $reserved = IO::Socket::INET->new(
LocalAddr => '127.0.0.1',
- #LocalPort => 0, # 0 is the default, and as a bonus this works on MSWin32+ActiveState 5.6.1
ReuseAddr => 0,
);
if (defined $reserved) {
@@ -54,7 +55,7 @@
inline_states => {
_start => sub {
$poe_kernel->alias_set('watcher');
- $_[HEAP]{alarm} = $poe_kernel->alarm_set(timeout => time() + 10);
+ $_[HEAP]{alarm} = $poe_kernel->delay_set(timeout => 10);
},
timeout => sub {
$poe_kernel->post(client => 'shutdown');
Modified: branches/upstream/libpoe-test-loops-perl/current/lib/POE/Test/Loops/wheel_tail.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libpoe-test-loops-perl/current/lib/POE/Test/Loops/wheel_tail.pm?rev=49788&op=diff
==============================================================================
--- branches/upstream/libpoe-test-loops-perl/current/lib/POE/Test/Loops/wheel_tail.pm (original)
+++ branches/upstream/libpoe-test-loops-perl/current/lib/POE/Test/Loops/wheel_tail.pm Fri Jan 1 20:38:30 2010
@@ -9,6 +9,7 @@
use Socket;
sub POE::Kernel::ASSERT_DEFAULT () { 1 }
+sub POE::Kernel::CATCH_EXCEPTIONS () { 0 }
BEGIN {
package POE::Kernel;
@@ -32,11 +33,12 @@
plan skip_all => "This test always hangs on MSWin32+perl older than 5.8.0";
}
if ($] < 5.010) {
- # ARGH, it doesn't lock up on Strawberry 5.8.x but it does on ActiveState 5.8.x!!!
- # ugly method, but it works for me...
+ # ARGH, it doesn't lock up on Strawberry 5.8.x but it does on
+ # ActiveState 5.8.x!!! ugly method, but it works for me...
require Config;
if ($Config::Config{cf_email} =~ /ActiveState/) {
- plan skip_all => "This test always hangs on MSWin32+ActiveState perl older than 5.10";
+ plan skip_all =>
+ "This test always hangs on MSWin32+ActiveState perl older than 5.10";
}
}
}
@@ -70,7 +72,7 @@
got_error => \&sss_error,
got_block => \&sss_block,
ev_timeout => sub {
- DEBUG and warn "=== sss got timeout";
+ DEBUG and warn "=== handle tail got timeout";
delete $_[HEAP]->{wheel};
},
},
@@ -103,26 +105,24 @@
sub sss_block {
my ($kernel, $heap, $block) = @_[KERNEL, HEAP, ARG0];
- DEBUG and warn "=== sss got block";
+ DEBUG and warn "=== handle tail got block ($block)";
$heap->{read_count}++;
$kernel->delay( ev_timeout => 10 );
}
sub sss_error {
my ($heap, $syscall, $errnum, $errstr, $wheel_id) = @_[HEAP, ARG0..ARG3];
- DEBUG and warn "=== sss got $syscall error $errnum: $errstr";
- if ($errnum) {
- $_[HEAP]->{test_two} = 0;
- }
+ DEBUG and warn "=== handle tail got $syscall error $errnum: $errstr";
+ $_[HEAP]->{test_two} = 0 if $errnum;
}
sub sss_stop {
my $heap = $_[HEAP];
- DEBUG and warn "=== sss stopped";
- ok($heap->{test_two}, "test two");
- ok(
- $heap->{read_count} == $max_send_count,
- "read everything we were sent " .
+ DEBUG and warn "=== handle tail stopped";
+ ok($heap->{test_two}, "handle tail test two");
+ is(
+ $heap->{read_count}, $max_send_count,
+ "handle tail read everything we were sent " .
"did($heap->{read_count}) wanted($max_send_count)"
);
}
@@ -286,24 +286,25 @@
unlink "./test-tail-file";
$heap->{wheel} = POE::Wheel::FollowTail->new(
- Filename => "./test-tail-file",
- InputEvent => "got_input",
- ErrorEvent => "got_error",
- ResetEvent => "got_reset",
- PollInterval => 0.1,
+ Filter => POE::Filter::Line->new(Literal => "\n"),
+ Filename => "./test-tail-file",
+ InputEvent => "got_input",
+ ErrorEvent => "got_error",
+ ResetEvent => "got_reset",
+ PollInterval => 0.1,
);
$kernel->delay(create_file => 1);
$heap->{sent_count} = 0;
$heap->{recv_count} = 0;
$heap->{reset_count} = 0;
- DEBUG and warn "=== start";
+ DEBUG and warn "=== file tail start";
},
create_file => sub {
open(FH, ">./test-tail-file") or die $!;
- print FH "moo\015\012";
+ print FH "moo\n";
close FH;
- DEBUG and warn "=== create";
+ DEBUG and warn "=== file tail create file";
$_[HEAP]->{sent_count}++;
},
@@ -311,7 +312,7 @@
my ($kernel, $heap) = @_[KERNEL, HEAP];
$heap->{recv_count}++;
- DEBUG and warn "=== input";
+ DEBUG and warn "=== file tail input: $_[ARG0]\n";
unlink "./test-tail-file";
@@ -323,23 +324,23 @@
delete $heap->{wheel};
},
- got_error => sub { warn "error"; die },
+ got_error => sub { warn "$_[ARG0] error $_[ARG1]: $_[ARG2]"; die },
got_reset => sub {
- DEBUG and warn "=== reset";
+ DEBUG and warn "=== file tail got reset";
$_[HEAP]->{reset_count}++;
},
_stop => sub {
- DEBUG and warn "=== stop";
+ DEBUG and warn "=== file tail stop";
my $heap = $_[HEAP];
ok(
($heap->{sent_count} == $heap->{recv_count}) &&
($heap->{sent_count} == 2),
- "sent and received everything we should " .
+ "file tail sent and received everything we should " .
"sent($heap->{sent_count}) recv($heap->{recv_count}) wanted(2)"
);
- ok($heap->{reset_count} > 0, "reset more than once");
+ is($heap->{reset_count}, 2, "file tail resets detected");
},
},
);
More information about the Pkg-perl-cvs-commits
mailing list