Skip to content

Commit

Permalink
Work around a consistent timeout issue in Hinrik's POE::Wheel::Run test.
Browse files Browse the repository at this point in the history
There is a mysterious 5sec delay when starting processes on some
Windows machines.  The consistent, roundish number of seconds makes me
suspect something environmental, like an antivirus program, but that's
just a wild guess.

Thanks to ultramantis on irc.perl.org #poe or letting me access their
machine with teamviewer.  I couldn't reproduce the problem on my own
systems, so it was vital to see it failing somewhere.
  • Loading branch information
rcaputo committed Jan 25, 2012
1 parent 054da73 commit d78e3d2
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion t/90_regression/hinrik-wheel-run-die.t
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -17,11 +17,16 @@ POE::Kernel->run;
sub _start { sub _start {
my ($kernel, $heap) = @_[KERNEL, HEAP]; my ($kernel, $heap) = @_[KERNEL, HEAP];


$kernel->delay('timeout', 5);
$heap->{quickie} = WheelWrapper->new( $heap->{quickie} = WheelWrapper->new(
Program => sub { die }, Program => sub { die },
ExitEvent => 'exit', ExitEvent => 'exit',
); );

# The delay goes after creating WheelWrapper. Starting a process
# takes a little over 5sec on some Windows systems, and I don't know
# why. This pretty much guarantees the timeout occurs.

$kernel->delay('timeout', 5);
} }


sub exit { sub exit {
Expand Down

0 comments on commit d78e3d2

Please sign in to comment.