db-jdo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Craig Russell <Craig.Russ...@Sun.COM>
Subject Re: JDO-58
Date Wed, 01 Jun 2005 18:21:55 GMT
Hi Michael,

On Jun 1, 2005, at 10:03 AM, Michael Watzek wrote:

> Hi Craig,
>
>> Hi Michael,
>> On Jun 1, 2005, at 9:30 AM, Michael Watzek wrote:
>>> Hi Craig,
>>>
>>>>>> And we should probably disallow pmf == null in cases where there

>>>>>> is work to do.
>>>>>
>>>>>
>>>>> I'm not sure. Do you mean that the test result is ERROR for test 
>>>>> cases having "pmf == null in cases where there is work to do"? Let 
>>>>> me know if you feel strong on this.
>>>>
>>>> I think so. Since this is a new feature, any test case that uses 
>>>> tearDown methods should leave the PMF open. Can you think of a case 
>>>> where this is not true?
>>>
>>> No. My question is: Do we want to *force* test cases to leave the 
>>> PMF open when they add tear down instances and/or classes?
>> Yes. Unless we can think of cases where the test method wants 
>> instances removed but needs to close the PMF for some reason. I think 
>> in these cases we can let the test method clean itself.
> Ok. What do you think of adding a check in tearDown (before the other 
> check):
>
> if ((pmf == null || pmf.isClosed()) &&
>     (this.tearDownInstances.size() > 0 || this.tearDownClasses.size() 
> > 0))
>    throw new JDOFatalException ("PMF must not be nullified or closed 
> when tear down instances and /or classes have been added.");

Sounds good.

Craig
>
> Michael
> -- 
> -------------------------------------------------------------------
> Michael Watzek                  Tech@Spree Engineering GmbH
> mailto:mwa.tech@spree.de        Buelowstr. 66
> Tel.:  ++49/30/235 520 36       10783 Berlin - Germany
> Fax.:  ++49/30/217 520 12       http://www.spree.de/
> -------------------------------------------------------------------
>
Craig Russell
Architect, Sun Java Enterprise System http://java.sun.com/products/jdo
408 276-5638 mailto:Craig.Russell@sun.com
P.S. A good JDO? O, Gasp!

Mime
View raw message