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-Status: No, score=-4.0 required=3.0 tests=ALL_TRUSTED,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 1A5F01F9FC for ; Tue, 9 Feb 2021 08:09:38 +0000 (UTC) From: Eric Wong To: meta@public-inbox.org Subject: [PATCH 01/11] t/thread-index-gap.t: avoid unnecessary map Date: Tue, 9 Feb 2021 07:09:27 -0100 Message-Id: <20210209080937.4678-2-e@80x24.org> In-Reply-To: <20210209080937.4678-1-e@80x24.org> References: <20210209080937.4678-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: We only care abount the number of results. --- t/thread-index-gap.t | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/t/thread-index-gap.t b/t/thread-index-gap.t index 83c3707d..125c5cbd 100644 --- a/t/thread-index-gap.t +++ b/t/thread-index-gap.t @@ -47,14 +47,12 @@ for my $msgs (['orig', reverse @msgs], ['shuffle', shuffle(@msgs)]) { my $over = $ibx->over; my $dbh = $over->dbh; my $tid = $dbh->selectall_arrayref('SELECT DISTINCT(tid) FROM over'); - my @tid = map { $_->[0] } @$tid; - is(scalar(@tid), 1, "only one thread initially ($desc)"); + is(scalar(@$tid), 1, "only one thread initially ($desc)"); $over->dbh_close; - run_script([qw(-index --reindex --rethread), $ibx->{inboxdir}]) or - BAIL_OUT 'rethread'; + run_script([qw(-index --no-fsync --reindex --rethread), + $ibx->{inboxdir}]) or BAIL_OUT 'rethread'; $tid = $dbh->selectall_arrayref('SELECT DISTINCT(tid) FROM over'); - @tid = map { $_->[0] } @$tid; - is(scalar(@tid), 1, "only one thread after rethread ($desc)"); + is(scalar(@$tid), 1, "only one thread after rethread ($desc)"); } done_testing;