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 CD0691F9FB for ; Sat, 15 Jun 2019 08:47:22 +0000 (UTC) From: Eric Wong To: meta@public-inbox.org Subject: [PATCH 08/20] tests: change messages to use "shard" instead of partition Date: Sat, 15 Jun 2019 08:47:04 +0000 Message-Id: <20190615084716.3075-9-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 potentially user-facing piece made consistent with Xapian terminology. --- t/indexlevels-mirror.t | 2 +- t/psgi_v2.t | 2 +- t/xcpdb-reshard.t | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/t/indexlevels-mirror.t b/t/indexlevels-mirror.t index 3597494..b685da1 100644 --- a/t/indexlevels-mirror.t +++ b/t/indexlevels-mirror.t @@ -138,7 +138,7 @@ sub import_index_incremental { if ($v == 2 && $level eq 'basic') { is_deeply([glob("$ibx->{mainrepo}/xap*/?/")], [], - 'no Xapian partition directories for v2 basic'); + 'no Xapian shard directories for v2 basic'); } if ($level ne 'basic') { ($nr, $msgs) = $ro_mirror->search->reopen->query('m:m@2'); diff --git a/t/psgi_v2.t b/t/psgi_v2.t index 5c358cd..3601068 100644 --- a/t/psgi_v2.t +++ b/t/psgi_v2.t @@ -205,7 +205,7 @@ test_psgi(sub { $www->call(@_) }, sub { $res = $cb->(GET('/v2test/0.git/info/refs')); is($res->code, 200, 'got info refs for dumb clones w/ .git suffix'); $res = $cb->(GET('/v2test/info/refs')); - is($res->code, 404, 'unpartitioned git URL fails'); + is($res->code, 404, 'v2 git URL w/o shard fails'); # ensure conflicted attachments can be resolved foreach my $body (qw(old new)) { diff --git a/t/xcpdb-reshard.t b/t/xcpdb-reshard.t index ce552f5..bf56404 100644 --- a/t/xcpdb-reshard.t +++ b/t/xcpdb-reshard.t @@ -48,14 +48,14 @@ is(scalar(@parts), $nproc, 'got expected parts'); my $orig = $ibx->over->query_xover(1, $ndoc); my %nums = map {; "$_->{num}" => 1 } @$orig; -# ensure we can go up or down in partitions, or stay the same: +# ensure we can go up or down in shards, or stay the same: 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, 'repartitioned to two parts'); + is(scalar(@new_parts), $R, 'resharded to two parts'); my $msgs = $ibx->search->query('s:this'); - is(scalar(@$msgs), $ndoc, 'got expected docs after repartitioning'); + is(scalar(@$msgs), $ndoc, 'got expected docs after resharding'); my %by_mid = map {; "$_->{mid}" => $_ } @$msgs; ok($by_mid{"m$_\@example.com"}, "$_ exists") for (1..$ndoc); -- EW