NOTE: If you are a developer, please use a private wiki based on foswiki/trunk on a daily base ...or use trunk.foswiki.org to view this page for some minimal testing.
Use Item8841 for copy changes for release 1.1.
You are here: Tasks Web>Item2286 (22 Aug 2010)

Item2286: looking into why the unit test FoswikiSuite uses more memory over time

Priority: CurrentState: AppliesTo: Component: WaitingFor:
Normal Waiting for Release Engine    
basically, I am wondering if there's a memory leak that will show up in run time, or if its just sloppy test code (I'm beginning to think the latter.)

-- SvenDowideit - 24 Oct 2009

Touch of over-enthusiasm there; clearing the static session object in extender.pl is going to blow away any installation checkins after the first. Need:

Index: extender.pl
===================================================================
--- extender.pl   (revision 5505)
+++ extender.pl   (working copy)
@@ -161,9 +161,6 @@
 # Can't do this until we have setlib.cfg
 require Foswiki::Configure::Dependency;
 
-$session->finish();
-undef $session;
-
 sub remap {
     my $file = shift;

-- CrawfordCurrie - 13 Nov 2009

its been working for a while, so closing smile

-- SvenDowideit - 18 Jun 2010

The unit tests are definitely using more memory. I noticed that because the FoswikiSuite no longer runs on my dev machine. Devel::Leak::Object shows there are objects that are not being cleaned up. I'm investigating.

Foswiki::Request does not have a finish() method. I am unsure of the implications of adding one, because Foswiki::new()'s $query parameter is a Foswiki::Request object but Foswiki::new() creates its own Foswiki::Request if the $query is false (i.e. undef). Foswiki::finish() should not "finish" the Foswiki::Request object if it was passed as an input (but it should "finish" the one it creates itself).

-- MichaelTempest - 15 Aug 2010

I am not sure how much of the output from Devel::Leak::Object is noise, and my attempt at cleaning up broke lots of things, so I abandoned that attempt. In consequence, I didn't add a finish() for Foswiki::Request.

However, I did find (and fix) an incorrect name in the StoreSmokeTests. I also found that Foswiki::finish() didn't list all of its fields.

I moved Fn_SEARCH to run its own process and now the unit tests run on my machine.

-- MichaelTempest - 22 Aug 2010

ItemTemplate edit

Summary looking into why the unit test FoswikiSuite? uses more memory over time
ReportedBy SvenDowideit
Codebase 1.0.7, trunk
SVN Range Foswiki-1.0.7, Sun, 20 Sep 2009, build 5061
AppliesTo Engine
Component
Priority Normal
CurrentState Waiting for Release
WaitingFor
Checkins Foswikirev:5373 Foswikirev:5375 Foswikirev:5392 Foswikirev:5506 Foswikirev:8525 Foswikirev:8587 Foswikirev:8648 Foswikirev:8649 Foswikirev:8650 Foswikirev:8651 Foswikirev:8652
TargetRelease minor
ReleasedIn 1.1.0
Topic revision: r16 - 22 Aug 2010 - 15:17:59 - MichaelTempest
 
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. see CopyrightStatement. Creative Commons LicenseGet Foswiki at sourceforge.net. Fast, secure and Free Open Source software downloads