summaryrefslogtreecommitdiffstats
path: root/debian/perl-framework/t/apache/expr_string.t
diff options
context:
space:
mode:
Diffstat (limited to 'debian/perl-framework/t/apache/expr_string.t')
-rw-r--r--debian/perl-framework/t/apache/expr_string.t9
1 files changed, 6 insertions, 3 deletions
diff --git a/debian/perl-framework/t/apache/expr_string.t b/debian/perl-framework/t/apache/expr_string.t
index a9115ee..4682d4a 100644
--- a/debian/perl-framework/t/apache/expr_string.t
+++ b/debian/perl-framework/t/apache/expr_string.t
@@ -3,10 +3,12 @@ use warnings FATAL => 'all';
use Apache::Test;
use Apache::TestRequest;
-use Apache::TestUtil qw(t_write_file t_start_error_log_watch t_finish_error_log_watch);
+use Apache::TestUtil qw(t_write_file t_start_error_log_watch t_finish_error_log_watch t_cmp);
use File::Spec;
+use Time::HiRes qw(usleep);
+
# test ap_expr
Apache::TestRequest::user_agent(keep_alive => 1);
@@ -62,6 +64,8 @@ foreach my $t (@test_cases) {
'SomeHeader' => 'SomeValue',
'User-Agent' => 'SomeAgent',
'Referer' => 'SomeReferer');
+ ### Sleep here, attempt to avoid intermittent failures.
+ usleep(250000);
my @loglines = t_finish_error_log_watch();
my @evalerrors = grep {/(?:internal evaluation error|flex scanner jammed)/i
@@ -97,8 +101,7 @@ foreach my $t (@test_cases) {
[ ]\(log_transaction) # trailing hook info (LogLevel debug and higher)
}x ) {
my $result = $1;
- print "Got '$result', expected '$expect'\n";
- ok($result eq $expect);
+ ok t_cmp($result, $expect, "log message @msg didn't match");
}
else {
print "Can't extract expr result from log message:\n@msg\n";