]> Sergey Matveev's repositories - public-inbox.git/blobdiff - xt/git_async_cmp.t
imap: require ".$UID_MIN-$UID_END" suffix
[public-inbox.git] / xt / git_async_cmp.t
index f8ffe3d9e10a34ae06dfa0f76e8a9136962e0edc..8f8d1cf4d01e12e21740e3c1de2a5f560052ace2 100644 (file)
@@ -1,5 +1,5 @@
 #!perl -w
-# Copyright (C) 2019 all contributors <meta@public-inbox.org>
+# Copyright (C) 2019-2020 all contributors <meta@public-inbox.org>
 # License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
 use strict;
 use Test::More;
@@ -25,9 +25,8 @@ my $async = timeit($nr, sub {
                $dig->add($$bref);
        };
        my $cat = $git->popen(@cat);
-       $git->cat_async_begin;
 
-       foreach (<$cat>) {
+       while (<$cat>) {
                my ($oid, undef, undef) = split(/ /);
                $git->cat_async($oid, $cb);
        }
@@ -39,7 +38,7 @@ my $async = timeit($nr, sub {
 my $sync = timeit($nr, sub {
        my $dig = Digest::SHA->new(1);
        my $cat = $git->popen(@cat);
-       foreach (<$cat>) {
+       while (<$cat>) {
                my ($oid, undef, undef) = split(/ /);
                my $bref = $git->cat_file($oid);
                $dig->add($$bref);