From: Eric Wong Date: Wed, 6 Feb 2019 23:22:56 +0000 (+0000) Subject: t/perf-msgview.t: fix broken performance test X-Git-Tag: v1.2.0~360 X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=1a958ac483da8edf45d077b57537b64341f75d7b;p=public-inbox.git t/perf-msgview.t: fix broken performance test WwwStream started depending on the WWW::style method for configurable CSS, so mock ::style so the benchmark runs properly. Fixes: f026dbdd392c9dd5 ('www: admin-configurable CSS via "publicinbox.css"') --- diff --git a/t/perf-msgview.t b/t/perf-msgview.t index 4975305a..0defafc4 100644 --- a/t/perf-msgview.t +++ b/t/perf-msgview.t @@ -19,6 +19,7 @@ if (require_git(2.19, 1)) { "git <2.19, cat-file lacks --unordered, locality suffers\n"; } +use_ok 'Plack::Util'; my $ibx = PublicInbox::Inbox->new({ mainrepo => $pi_dir, name => 'name' }); my $git = $ibx->git; my $fh = $git->popen(@cat); @@ -29,6 +30,7 @@ select($vec, undef, undef, 60) or die "timed out waiting for --batch-check"; my $ctx = { env => { HTTP_HOST => 'example.com', 'psgi.url_scheme' => 'https' }, -inbox => $ibx, + www => Plack::Util::inline_object(style => sub {''}), }; my ($str, $mime, $res, $cmt, $type); my $n = 0;