diff options
author | Eric Wong <e@80x24.org> | 2019-06-14 21:30:31 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2019-06-14 21:56:41 +0000 |
commit | a060a5a94d02045b48ccb8b3f4105170e52719b2 (patch) | |
tree | e3ff2eed7df5c13d8108276db5d3ab6237de7427 /t | |
parent | a45af9138d4a708ff7818dba91e03b6d4d22e69c (diff) | |
download | public-inbox-a060a5a94d02045b48ccb8b3f4105170e52719b2.tar.gz |
Another step in maintaining consistency with Xapian docs.
Diffstat (limited to 't')
-rw-r--r-- | t/xcpdb-reshard.t | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/t/xcpdb-reshard.t b/t/xcpdb-reshard.t index bf56404d..d921e12f 100644 --- a/t/xcpdb-reshard.t +++ b/t/xcpdb-reshard.t @@ -43,8 +43,8 @@ for my $i (1..$ndoc) { ok($im->add($mime), "message $i added"); } $im->done; -my @parts = grep(m!/\d+\z!, glob("$ibx->{mainrepo}/xap*/*")); -is(scalar(@parts), $nproc, 'got expected parts'); +my @shards = grep(m!/\d+\z!, glob("$ibx->{mainrepo}/xap*/*")); +is(scalar(@shards), $nproc, 'got expected shards'); my $orig = $ibx->over->query_xover(1, $ndoc); my %nums = map {; "$_->{num}" => 1 } @$orig; @@ -52,8 +52,8 @@ my %nums = map {; "$_->{num}" => 1 } @$orig; for my $R (qw(2 4 1 3 3)) { delete $ibx->{search}; # release old handles is(system(@xcpdb, "-R$R", $ibx->{mainrepo}), 0, "xcpdb -R$R"); - my @new_parts = grep(m!/\d+\z!, glob("$ibx->{mainrepo}/xap*/*")); - is(scalar(@new_parts), $R, 'resharded to two parts'); + my @new_shards = grep(m!/\d+\z!, glob("$ibx->{mainrepo}/xap*/*")); + is(scalar(@new_shards), $R, 'resharded to two shards'); my $msgs = $ibx->search->query('s:this'); is(scalar(@$msgs), $ndoc, 'got expected docs after resharding'); my %by_mid = map {; "$_->{mid}" => $_ } @$msgs; @@ -64,7 +64,7 @@ for my $R (qw(2 4 1 3 3)) { # ensure docids in Xapian match NNTP article numbers my $tot = 0; my %tmp = %nums; - foreach my $d (@new_parts) { + foreach my $d (@new_shards) { my $xdb = Search::Xapian::Database->new($d); $tot += $xdb->get_doccount; my $it = $xdb->postlist_begin(''); |