]> Sergey Matveev's repositories - public-inbox.git/commitdiff
t/thread-index-gap.t: avoid unnecessary map
authorEric Wong <e@80x24.org>
Tue, 9 Feb 2021 08:09:27 +0000 (07:09 -0100)
committerEric Wong <e@80x24.org>
Wed, 10 Feb 2021 06:59:00 +0000 (06:59 +0000)
We only care abount the number of results.

t/thread-index-gap.t

index 83c3707d21d795e55d7023ea67fcedee027524cf..125c5cbdf77f783ef4f48ff8a1147ffab8fe2b3c 100644 (file)
@@ -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;