When running unit tests for the whole
TWikiSuite.pm
, my tests crash with a memory fault after the process has grown to some 130MB.
That's the same thing as
Item2158, only that the cure needs to be applied to most test suites:
Many unit tests create a
TWiki->new()
during their
set_up
routine, i.e. repeatedly for each test. But we know since
Item2158 that
TWiki
objects contain circular references, so they need to be properly destroyed.
The easiest way would be to call
$twiki->finish()
during the
tear_down()
routine in all those packages which create the object during
set_up()
.
Aaargh. Many test cases create
new TWiki
objects on the fly, or
TWiki->new()
. I give up after having reduced RAM to <100MB for
TWikiSuite.pm
on my machine, so I can run the suite. Feel free to investigate and provide further patches, otherwise I'll close the item in a week or so.
haj
No further checkins, closing. --
haj