diff options
author | Eric Wong <e@80x24.org> | 2017-01-07 01:44:48 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2017-01-07 01:45:43 +0000 |
commit | 37415497e02c3cacdd70060acddc2604342b66e5 (patch) | |
tree | be4f777314637919f2bb29bb7cd771de1352a36a /t/config_limiter.t | |
parent | 5874d6355916e96a220e07bb229e090a92415afd (diff) | |
download | public-inbox-37415497e02c3cacdd70060acddc2604342b66e5.tar.gz |
We can do a better job initializing the data structure so we no longer need to rely on weak references to cleanup when we ditch the config on reload.
Diffstat (limited to 't/config_limiter.t')
-rw-r--r-- | t/config_limiter.t | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/t/config_limiter.t b/t/config_limiter.t index 486bfbe9..f0b65281 100644 --- a/t/config_limiter.t +++ b/t/config_limiter.t @@ -37,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'); } |