From 90e12e68de364f175d79508c96921891cb766ac7 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sat, 14 May 2016 01:24:08 +0000 Subject: t/nntpd: avoid fork+exec for search indexing The Xapian search index is required for the NNTP server, so there's no point in calling system() for it like we do in other tests. This should speed up the test a small amount. --- t/nntpd.t | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 't') diff --git a/t/nntpd.t b/t/nntpd.t index a389a3e9..a9df36dc 100644 --- a/t/nntpd.t +++ b/t/nntpd.t @@ -27,7 +27,6 @@ my $addr = $group . '@example.com'; my $cfgpfx = "publicinbox.$group"; my $nntpd = 'blib/script/public-inbox-nntpd'; my $init = 'blib/script/public-inbox-init'; -my $index = 'blib/script/public-inbox-index'; use_ok 'PublicInbox::Import'; use_ok 'PublicInbox::Git'; @@ -65,7 +64,8 @@ EOF my $im = PublicInbox::Import->new($git, 'test', $addr); $im->add($mime); $im->done; - is(0, system($index, $maindir), 'indexed git dir'); + my $s = PublicInbox::SearchIdx->new($maindir, 1); + $s->index_sync; } ok($sock, 'sock created'); -- cgit v1.2.3-24-ge0c7