Daniel Cheng a ?crit :
> On Sun, Sep 7, 2008 at 9:51 PM, <batosai at freenetproject.org> wrote:
>> Author: batosai
>> Date: 2008-09-07 13:51:05 +0000 (Sun, 07 Sep 2008)
>> New Revision: 22526
>>
>> Modified:
>> trunk/plugins/WoT/src/plugins/WoT/IdentityTest.java
>> Log:
>> Force a garbage collection before bringing db4o up.
>>
>> Modified: trunk/plugins/WoT/src/plugins/WoT/IdentityTest.java
>> ===================================================================
>> --- trunk/plugins/WoT/src/plugins/WoT/IdentityTest.java 2008-09-07 13:47:24
>> UTC (rev 22525)
>> +++ trunk/plugins/WoT/src/plugins/WoT/IdentityTest.java 2008-09-07 13:51:05
>> UTC (rev 22526)
>> @@ -79,7 +79,7 @@
>>
>> public void testPersistence() throws MalformedURLException,
>> UnknownIdentityException, DuplicateIdentityException {
>> db.close();
>> - // TODO Force a garbage collection/finalization
>> + System.gc();
>
> try System.runFinalization() and some sleep too.
> the spec just say it try to gc/finalize with "best effort".
> (which is a no-op if you run with java -XX:+CMSIncrementalMode )
Just commited your suggestion. Do you think 2 seconds are enough ?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 252 bytes
Desc: OpenPGP digital signature
URL:
<https://emu.freenetproject.org/pipermail/devl/attachments/20080907/73ee90b4/attachment.pgp>