summaryrefslogtreecommitdiffstats
path: root/debian/perl-framework/t/apache/expr_string.t
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-25 04:41:29 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-25 04:41:29 +0000
commitbc9388be5e541fa5aeae9ee8f74cf1384e0aa2f2 (patch)
treea9acb2f667672646886604a0347dcb7eb6d57ae7 /debian/perl-framework/t/apache/expr_string.t
parentMerging upstream version 2.4.59. (diff)
downloadapache2-bc9388be5e541fa5aeae9ee8f74cf1384e0aa2f2.tar.xz
apache2-bc9388be5e541fa5aeae9ee8f74cf1384e0aa2f2.zip
Merging debian version 2.4.59-1~deb10u1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
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";