From 37415497e02c3cacdd70060acddc2604342b66e5 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sat, 7 Jan 2017 01:44:48 +0000 Subject: inbox: eliminate weaken usage entirely 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. --- t/config_limiter.t | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 't/config_limiter.t') 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'); } -- cgit v1.2.3-24-ge0c7