[
https://issues.apache.org/jira/browse/OAK-3301?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14716919#comment-14716919
]
Julian Sedding commented on OAK-3301:
-------------------------------------
IIRC the fields are static because they hold the source repository (JR2) for an
upgrade. Since this is somewhat expensive to set up it makes some sense to
cache it statically. Typically the various test methods test different upgrade
setups on an identical source repository.
It might be worthwhile to look into a refactoring anyways. When I extended some
of the tests, it felt a bit awkward. Maybe an @Rule can help achieve the same
goal.
> AbstractRepositoryUpgrade leaks Repository instances
> ----------------------------------------------------
>
> Key: OAK-3301
> URL: https://issues.apache.org/jira/browse/OAK-3301
> Project: Jackrabbit Oak
> Issue Type: Bug
> Components: upgrade
> Reporter: Robert Munteanu
> Fix For: 1.4
>
> Attachments:
> 0001-OAK-3301-AbstractRepositoryUpgrade-leaks-Repository-.patch
>
>
> AbstractRepositoryUpgradeTest creates (JCR) repository instances but does not
> close them ( actually creates a repository each time a session is requested ).
> This leads to out of memory errors when the process limit is hit on a machine.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)