Janek Bogucki wrote:
On Wed, 2004-03-24 at 21:57, Janek Bogucki wrote:

At the end there is this which you did not mention in your original post
so it might be new information

   [junit] Testcase: testPurgeValues took 4.903 sec
   [junit]     Caused an ERROR
   [junit] null
   [junit] java.lang.OutOfMemoryError
   [junit]     <<no stack trace available>>

[junit] Testcase: testPurgeValues



I now realize that this is actually how the test is intended to work.
Sorry for the noise.

It looks to me as though the intention would be to fail with
"Max iterations reached before resource released" which happens if you decrease the bound on the loop to, say 20. This should probably be changed.


The null test that is failing is

valueReference.get() == null

I have not fully grokked the code, so the following is speculation, but might be helpful.

The test setup is

WeakReference keyReference = new WeakReference(key);
WeakReference valueReference = new WeakReference(value);

Map testMap = new ReferenceMap(ReferenceMap.WEAK, ReferenceMap.HARD, true);

so the valueReference release has to be triggered by releasing the key reference, but in ReferenceEntry.purge(ref), there is no check for purgeValues.

Phil





-Janek


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to