X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=xt%2Fgit_async_cmp.t;h=d66b371ff760153d8b2ee5b8b560d734807953b9;hb=21fcd8a37c82c1ef654d402cf592f0c9d803aa26;hp=18fce3dbe83df274e6bc4e7bc11e8a226d8d59ff;hpb=e67159e720994c7442636a7d5250ea8a49a85b28;p=public-inbox.git diff --git a/xt/git_async_cmp.t b/xt/git_async_cmp.t index 18fce3db..d66b371f 100644 --- a/xt/git_async_cmp.t +++ b/xt/git_async_cmp.t @@ -1,5 +1,5 @@ #!perl -w -# Copyright (C) 2019 all contributors +# Copyright (C) 2019-2021 all contributors # License: AGPL-3.0+ use strict; use Test::More; @@ -18,6 +18,7 @@ if (require_git(2.19, 1)) { } my @dig; my $nr = $ENV{NR} || 1; +diag "NR=$nr"; my $async = timeit($nr, sub { my $dig = Digest::SHA->new(1); my $cb = sub { @@ -25,14 +26,13 @@ my $async = timeit($nr, sub { $dig->add($$bref); }; my $cat = $git->popen(@cat); - $git->cat_async_begin; while (<$cat>) { my ($oid, undef, undef) = split(/ /); $git->cat_async($oid, $cb); } close $cat or die "cat: $?"; - $git->cat_async_wait; + $git->async_wait_all; push @dig, ['async', $dig->hexdigest ]; });