X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=t%2Fconfig_limiter.t;h=85a71257b7544d33e1e138b82e0689c92782f11f;hb=f826a7830bce67c0f8c653baf97f7769bb2c57d9;hp=bfea151096c9c2fe502120e0b14318247ae80ce7;hpb=2c972f3d70caf99488fff300341450e48be6ebf1;p=public-inbox.git diff --git a/t/config_limiter.t b/t/config_limiter.t index bfea1510..85a71257 100644 --- a/t/config_limiter.t +++ b/t/config_limiter.t @@ -1,4 +1,4 @@ -# Copyright (C) 2016 all contributors +# Copyright (C) 2016-2018 all contributors # License: AGPL-3.0+ use strict; use warnings; @@ -17,7 +17,6 @@ my $cfgpfx = "publicinbox.test"; my $lim = $git->{-httpbackend_limiter}; ok($lim, 'Limiter exists'); is($lim->{max}, 12, 'limiter has expected slots'); - $git = undef; $ibx->{git} = undef; $git = $ibx->git; isnt($old, "$git", 'got new Git object'); @@ -26,7 +25,7 @@ my $cfgpfx = "publicinbox.test"; { my $config = PublicInbox::Config->new({ - 'limiter.named.max' => 3, + 'publicinboxlimiter.named.max' => 3, "$cfgpfx.address" => 'test@example.com', "$cfgpfx.mainrepo" => '/path/to/non/existent', "$cfgpfx.httpbackendmax" => 'named', @@ -38,12 +37,11 @@ my $cfgpfx = "publicinbox.test"; my $lim = $git->{-httpbackend_limiter}; ok($lim, 'Limiter exists'); is($lim->{max}, 3, 'limiter has expected slots'); - $git = undef; $ibx->{git} = undef; - PublicInbox::Inbox::weaken_task; - $git = $ibx->git; - isnt($old, "$git", 'got new Git object'); - is("$git->{-httpbackend_limiter}", "$lim", 'same limiter'); + PublicInbox::Inbox::cleanup_task; + my $new = $ibx->git; + isnt($old, "$new", 'got new Git object'); + is("$new->{-httpbackend_limiter}", "$lim", 'same limiter'); is($lim->{max}, 3, 'limiter has expected slots'); }