]> Sergey Matveev's repositories - public-inbox.git/blobdiff - t/config_limiter.t
remove hard Devel::Peek dependency and lazy load for daemons
[public-inbox.git] / t / config_limiter.t
index 3c7ec557f2bbc617b825bce2c0c93a8c1c9da43e..b18951a61a2f5c8f4f664fd7f80078b44fb8a26e 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 2016 all contributors <meta@public-inbox.org>
+# Copyright (C) 2016-2018 all contributors <meta@public-inbox.org>
 # License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
 use strict;
 use warnings;
@@ -25,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',
@@ -37,12 +37,10 @@ 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');
+       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');
 }