]> git.ipfire.org Git - thirdparty/public-inbox.git/commitdiff
xt/perf-threading: modernize + remove Xapian dependency
authorEric Wong <e@80x24.org>
Mon, 10 Jun 2024 11:34:26 +0000 (11:34 +0000)
committerEric Wong <e@80x24.org>
Tue, 11 Jun 2024 18:37:43 +0000 (18:37 +0000)
Threading hasn't required Xapian (only SQLite) for a while now;
but I'm revisiting this test for another minor optimization.

xt/perf-threading.t

index 57e9db9ba90cf5491757d83bcf3c7749aaa8a731..24c1a873e0007e66d5559664b41a8c2fa0080fc6 100644 (file)
@@ -1,18 +1,16 @@
-# Copyright (C) 2016-2021 all contributors <meta@public-inbox.org>
+#!perl -w
+# Copyright (C) all contributors <meta@public-inbox.org>
 # License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
 #
 # real-world testing of search threading
-use strict;
-use warnings;
+use v5.12;
 use Test::More;
 use Benchmark qw(:all);
 use PublicInbox::Inbox;
 my $inboxdir = $ENV{GIANT_INBOX_DIR} // $ENV{GIANT_PI_DIR};
 plan skip_all => "GIANT_INBOX_DIR not defined for $0" unless $inboxdir;
 my $ibx = PublicInbox::Inbox->new({ inboxdir => $inboxdir });
-eval { require PublicInbox::Search };
-my $srch = $ibx->search;
-plan skip_all => "$inboxdir not configured for search $0 $@" unless $srch;
+$ibx->over or plan skip_all => "$inboxdir not indexed for $0 $@";
 
 require PublicInbox::View;