Erico, That is a little strange. I'll look further into it. If the leak is coming from paintPass() / paintFail() it should exist for every assertion not just assertEqual().
-Mark On Sep 3, 1:43 pm, "Erico Franco" <[EMAIL PROTECTED]> wrote: > Hi Mark, > > Thanks for the reply. > > I've noticed the memory leak is caused due to call of ob_start() inside > cake/tests/lib/cake_reporter.php (paintPass($message) function) without any > ob_end_flush() call. > > In this way, successive assertEqual() calls will result in ob_start() calls > without any ob_end_flush() calls. > > According to PHP documentation, ob_start() and ob_end_flush() should be > called the same number of times: > > http://www.php.net/ob_start > > I'm not sure if ob_end_flush() is finally being called on the very end of > test suite execution, but each time an asserEqual is being called it is > getting 40K of memory. > > regards > > Erico > > 2008/9/3 mark_story <[EMAIL PROTECTED]> > > > > > On Sep 2, 2:25 pm, Defranco <[EMAIL PROTECTED]> wrote: > > > Hi, > > > > I just noticed that assertEqual() function (test suite) in cakephp 1.2 > > > RC2 is consuming some memory inside test cases. > > > > I noticed that 300 assertEqual() executions, gets about 20 MB of PHP > > > free mem usage. > > > > It sounds a Memory Leak isn't it? > > > > I'm using cakephp 1.2.0.7296 RC2, and debug set to 1 > > > > kind regards > > > > defranco > > > If there is a memory leak it most likely be related to SimpleTest > > rather than CakePHP as we do not maintain the SimpleTest libraries. I > > haven't noticed any out of memory errors personally. But perhaps the > > simpletest people might know something about it. > > > -Mark --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---
