Skip to content

Commit

Permalink
Replace z_rt53302_fh_watchers.pm with z_rt53302_fh_watchers_slow.pm.
Browse files Browse the repository at this point in the history
The non-slow one was broken since its client shuts down without
waiting for the server's response.
  • Loading branch information
rcaputo committed Mar 23, 2010
1 parent 92d65ba commit 3a6186d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 122 deletions.
1 change: 0 additions & 1 deletion poe-test-loops/MANIFEST
Expand Up @@ -39,5 +39,4 @@ lib/POE/Test/Loops/z_rt39872_sigchld_stop.pm
lib/POE/Test/Loops/z_rt54319_bazerka_followtail.pm
lib/POE/Test/Loops/z_steinert_signal_integrity.pm
lib/POE/Test/Loops/z_rt53302_fh_watchers.pm
lib/POE/Test/Loops/z_rt53302_fh_watchers_slow.pm
t/01_no_tests.t
11 changes: 8 additions & 3 deletions poe-test-loops/lib/POE/Test/Loops/z_rt53302_fh_watchers.pm
Expand Up @@ -26,7 +26,7 @@ BEGIN {
}

use Test::More;
plan tests => 7;
plan tests => 8;

use POE qw( Component::Server::TCP Component::Client::TCP );
use Socket qw( sockaddr_in );
Expand All @@ -42,6 +42,7 @@ my $acceptor_port;

my $num_client_connects = 0;
my $num_client_disconnects = 0;
my $num_client_inputs = 0;
my $num_client_flushes = 0;

# Spawn the TCP server.
Expand Down Expand Up @@ -87,11 +88,14 @@ for ( 1 .. $num_clients ) {
$num_client_connects++;

$_[HEAP]->{server}->put( 'from client' );
$_[KERNEL]->yield( 'shutdown' );
},
Disconnected => sub { $num_client_disconnects++ },

ServerInput => sub {},
ServerInput => sub {
$num_client_inputs++;

$_[KERNEL]->delay( 'shutdown' => 1 );
},
ServerError => sub {},
ServerFlushed => sub { $num_client_flushes++ },
);
Expand All @@ -107,6 +111,7 @@ is( $num_server_flushes, $num_clients, "Server flushed $num_clients lines of dat

is( $num_client_connects, $num_clients, "Client connected $num_clients times" );
is( $num_client_disconnects, $num_clients, "Client disconnected $num_clients times" );
is( $num_client_inputs, $num_clients, "Server sent input $num_clients times" );
is( $num_client_flushes, $num_clients, "Client flushed $num_clients lines of data" );

1;
Expand Down
118 changes: 0 additions & 118 deletions poe-test-loops/lib/POE/Test/Loops/z_rt53302_fh_watchers_slow.pm

This file was deleted.

0 comments on commit 3a6186d

Please sign in to comment.