From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-4.0 required=3.0 tests=ALL_TRUSTED,BAYES_00 shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id D26042141A for ; Thu, 7 Feb 2019 21:38:25 +0000 (UTC) From: Eric Wong To: meta@public-inbox.org Subject: [PATCH 2/2] t/perf-msgview.t: fix broken performance test Date: Thu, 7 Feb 2019 21:38:25 +0000 Message-Id: <20190207213825.19332-2-e@80x24.org> In-Reply-To: <20190207213825.19332-1-e@80x24.org> References: <20190207213825.19332-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: 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"') --- t/perf-msgview.t | 2 ++ 1 file changed, 2 insertions(+) diff --git a/t/perf-msgview.t b/t/perf-msgview.t index 4975305..0defafc 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; -- EW