From: Eric Wong Date: Tue, 9 Feb 2021 08:09:27 +0000 (-0100) Subject: t/thread-index-gap.t: avoid unnecessary map X-Git-Tag: v1.7.0~1151 X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=3720644a427fcb812fd4996ba0d241bfedf7571a;p=public-inbox.git t/thread-index-gap.t: avoid unnecessary map We only care abount the number of results. --- 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;