]> Sergey Matveev's repositories - public-inbox.git/commitdiff
test_common: cleanup inbox objects after use
authorEric Wong <e@80x24.org>
Thu, 25 Mar 2021 04:20:17 +0000 (06:20 +0200)
committerEric Wong <e@80x24.org>
Thu, 25 Mar 2021 17:58:54 +0000 (17:58 +0000)
This stops us from leaking some more file handles across
test cases.

lib/PublicInbox/TestCommon.pm

index d4117b6cb298bf1eee6daba9b4d9e55d80747f12..e127970ee8279bedb120034e6b0fc25a83d68a16 100644 (file)
@@ -291,6 +291,7 @@ sub run_script ($;$$) {
                local $0 = join(' ', @$cmd);
                my $orig_io = _prepare_redirects($fhref);
                _run_sub($sub, $key, \@argv);
+               eval { PublicInbox::Inbox::cleanup_task() };
                _undo_redirects($orig_io);
                select STDOUT;
        }