From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-4.0 required=3.0 tests=ALL_TRUSTED,AWL,BAYES_00 shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id ECCE01FBAD for ; Sat, 15 Jun 2019 08:47:34 +0000 (UTC) From: Eric Wong To: meta@public-inbox.org Subject: [PATCH 19/20] t/xcpdb-reshard: use 'shard' term in local variables Date: Sat, 15 Jun 2019 08:47:15 +0000 Message-Id: <20190615084716.3075-20-e@80x24.org> In-Reply-To: <20190615084716.3075-1-e@80x24.org> References: <20190615084716.3075-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: Another step in maintaining consistency with Xapian docs. --- t/xcpdb-reshard.t | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/t/xcpdb-reshard.t b/t/xcpdb-reshard.t index bf56404..d921e12 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(''); -- EW