X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=t%2Fperf-msgview.t;h=492ed4877a90d517b3ca2ae354121eee0f669eff;hb=4821798351defce82c102e46d6f5f84f0cdc0e34;hp=adeb7aac78caef3401324346d4e466272fa09937;hpb=ecacd5d9c9604bf2fe235f2ff4a79e9668fd5010;p=public-inbox.git diff --git a/t/perf-msgview.t b/t/perf-msgview.t index adeb7aac..492ed487 100644 --- a/t/perf-msgview.t +++ b/t/perf-msgview.t @@ -8,6 +8,9 @@ use PublicInbox::Inbox; use PublicInbox::View; require './t/common.perl'; +my $pi_dir = $ENV{GIANT_PI_DIR}; +plan skip_all => "GIANT_PI_DIR not defined for $0" unless $pi_dir; + my @cat = qw(cat-file --buffer --batch-check --batch-all-objects); if (require_git(2.19, 1)) { push @cat, '--unordered'; @@ -16,10 +19,8 @@ if (require_git(2.19, 1)) { "git <2.19, cat-file lacks --unordered, locality suffers\n"; } -my $pi_dir = $ENV{GIANT_PI_DIR}; -plan skip_all => "GIANT_PI_DIR not defined for $0" unless $pi_dir; - -my $ibx = PublicInbox::Inbox->new({ mainrepo => $pi_dir, name => 'name' }); +use_ok 'Plack::Util'; +my $ibx = PublicInbox::Inbox->new({ inboxdir => $pi_dir, name => 'name' }); my $git = $ibx->git; my $fh = $git->popen(@cat); my $vec = ''; @@ -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;