user/dev discussion of public-inbox itself
 help / color / mirror / code / Atom feed
Search results ordered by [date|relevance]  view[summary|nested|Atom feed]
thread overview below | download mbox.gz: |
* [PATCH] t/nntpd: avoid fork+exec for search indexing
@ 2016-05-14  1:26  7% Eric Wong
  0 siblings, 0 replies; 1+ results
From: Eric Wong @ 2016-05-14  1:26 UTC (permalink / raw)
  To: meta

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(-)

diff --git a/t/nntpd.t b/t/nntpd.t
index a389a3e..a9df36d 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');

^ permalink raw reply related	[relevance 7%]

Results 1-1 of 1 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2016-05-14  1:26  7% [PATCH] t/nntpd: avoid fork+exec for search indexing Eric Wong

Code repositories for project(s) associated with this public inbox

	https://80x24.org/public-inbox.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).