diff options
author | Eric Wong <e@80x24.org> | 2017-02-10 01:51:05 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2017-02-10 02:08:58 +0000 |
commit | 52f9edfb756676b471deac69e5d55df1933aa528 (patch) | |
tree | 70d8e53d8cd09600968e68f80bd4d288cf0ee77e /t | |
parent | fa52216cc1bd95db3757f5bcae46ab539b66ce1d (diff) | |
download | public-inbox-52f9edfb756676b471deac69e5d55df1933aa528.tar.gz |
This simplifies the code a bit and reduces the translation overhead for looking directly at data from tools shipped with Xapian. While we're at it, fix thread-all.t :)
Diffstat (limited to 't')
-rw-r--r-- | t/search.t | 9 | ||||
-rw-r--r-- | t/thread-all.t | 5 |
2 files changed, 4 insertions, 10 deletions
@@ -70,15 +70,8 @@ sub filter_mids { is($found->mid, 'root@s', 'mid set correctly'); ok(int($found->thread_id) > 0, 'thread_id is an integer'); + my ($res, @res); my @exp = sort qw(root@s last@s); - my $res = $ro->query("path:hello_world"); - my @res = filter_mids($res); - is_deeply(\@res, \@exp, 'got expected results for path: match'); - - foreach my $p (qw(hello hello_ hello_world2 hello_world_)) { - $res = $ro->query("path:$p"); - is($res->{total}, 0, "path variant `$p' does not match"); - } $res = $ro->query('s:(Hello world)'); @res = filter_mids($res); diff --git a/t/thread-all.t b/t/thread-all.t index 8ccf4f8c..b1f9b47c 100644 --- a/t/thread-all.t +++ b/t/thread-all.t @@ -1,7 +1,7 @@ # Copyright (C) 2016 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 +# real-world testing of search threading performance use strict; use warnings; use Test::More; @@ -16,7 +16,6 @@ plan skip_all => "$pi_dir not initialized for $0" if $@; require PublicInbox::View; require PublicInbox::SearchThread; -my $pfx = PublicInbox::Search::xpfx('thread'); my $opts = { limit => 1000000, asc => 1 }; my $t0 = clock_gettime(CLOCK_MONOTONIC); my $elapsed; @@ -35,4 +34,6 @@ PublicInbox::View::thread_results($msgs); $elapsed = clock_gettime(CLOCK_MONOTONIC) - $t0; diag "thread_results $elapsed"; +ok(1, 'test completed without crashing :)'); + done_testing(); |