Hi guys, there is/was a memory leak when running integration tests. I analyzed a heap dump and saw that when running core-integ there were 350000 instances of SchemaObjectWrapper which hold lot of String objects.
The problem is the following: The FrameworkSuite (or better its super class Suite) holds a list of all Runners (FrameworkRunner in our case). The FrameworkRunner holds a reference to a DirectoryService. The DefaultDirectoryService holds many references, especially to the schema manager. Even when FrameworkRunner calls DirectoryService.shutdown() when the test is finished, the directory service still holds references to schema manager. As a consequence all schema objects created in each test survive till the the test suite is finished. I committed a quick workaround in [1], see the difference in heap usage in [2] and [3]. Still I want to ask if it won't be better to clean and nullout all instance variables of DefaultDirectoryService when its shutdown() method is called? But I'm not sure if it works because we also have tests that shutdown and startup the directory service. Thoughts? Kind Regards, Stefan [1] http://svn.apache.org/viewvc?rev=1038545&view=rev [2] http://img132.imageshack.us/img132/4876/screenshot20101124at111.png [3] http://img7.imageshack.us/img7/4876/screenshot20101124at111.png
