Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Increase the timing tolerances on some tests.
  • Loading branch information
rcaputo committed Apr 6, 2006
1 parent aa0617f commit 7432891
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
7 changes: 4 additions & 3 deletions tests/30_loops/00_base/k_alarms.pm
Expand Up @@ -162,9 +162,10 @@ sub test_stop {
ok($heap->{test}->{path_nine} == 11, "mixed delay APIs rang properly");
ok($heap->{test}->{path_ten} == 1, "stopped delay should not ring");

# Here's where we check the overall run time. Increased to 10s for
# extremely slow, overtaxed machines like my NT test platform.
ok(time() - $heap->{start_time} <= 10, "tests ran reasonably fast");
# Here's where we check the overall run time. Increased to 15s for
# extremely slow, overtaxed machines like my XP system running under
# Virtual PC.
ok(time() - $heap->{start_time} <= 15, "tests ran reasonably fast");

# And test alarm order.
ok(
Expand Down
11 changes: 7 additions & 4 deletions tests/30_loops/00_base/wheel_run.pm
Expand Up @@ -92,7 +92,7 @@ my $program = (
# Ask the child for something on stdout.
$heap->{wheel}->put( 'out test-out' );

$kernel->delay(close => 5);
$kernel->delay(close => 10);
},

# Error! Ow!
Expand All @@ -104,6 +104,7 @@ my $program = (
close => sub {
DEBUG and warn "close";
delete $_[HEAP]->{wheel};
$_[KERNEL]->delay(close => undef);
},

# Dummy _stop to prevent runtime errors.
Expand Down Expand Up @@ -197,7 +198,7 @@ SKIP: {
$heap->{wheel}->put( 'out test-out' );

# Timeout.
$kernel->delay(close => 5);
$kernel->delay(close => 10);
},

# Error! Ow!
Expand All @@ -209,6 +210,7 @@ SKIP: {
close => sub {
DEBUG and warn "close";
delete $_[HEAP]->{wheel};
$_[KERNEL]->delay(close => undef);
},

# Dummy _stop to prevent runtime errors.
Expand Down Expand Up @@ -288,7 +290,7 @@ SKIP: {

# Ask the child for something on stdout.
$heap->{wheel}->put( 'out test-out' );
$kernel->delay(bye => 5);
$kernel->delay(bye => 10);

DEBUG and warn "_start";
},
Expand All @@ -298,6 +300,7 @@ SKIP: {
bye => sub {
DEBUG and warn "bye";
delete $_[HEAP]->{wheel};
$_[KERNEL]->delay(bye => undef);
},

# Error! Ow!
Expand All @@ -320,7 +323,7 @@ SKIP: {

if ($child_pid == $heap->{wheel}->PID()) {
DEBUG and warn "\tthe child process is ours\n";
delete $heap->{wheel};
$_[KERNEL]->yield("bye");
}
return 0;
},
Expand Down

0 comments on commit 7432891

Please sign in to comment.