unofficial mirror of meta@public-inbox.org
 help / color / mirror / Atom feed
* [PATCH] t/nntpd: avoid fork+exec for search indexing
@ 2016-05-14  1:26 Eric Wong
  2016-05-14  1:47 ` [PATCH] t/nntpd: test for wide characters and UTF-8 mangling Eric Wong
  0 siblings, 1 reply; 2+ messages in thread
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	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-05-14  1:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-14  1:26 [PATCH] t/nntpd: avoid fork+exec for search indexing Eric Wong
2016-05-14  1:47 ` [PATCH] t/nntpd: test for wide characters and UTF-8 mangling Eric Wong

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