Minor point, but I would suggest doing it in setUp() for a couple reasons:

* You know datastore is in good state before test runs instead of after
* You can examine datastore state afterwards to double check things manually
* If things go wrong during the test, the evidence isn't erased

On Aug 9, 2005, at 5:51 PM, Craig Russell wrote:

Hi,

I'm thinking a better way of cleaning up might be:

Extent toBeDeleted = pm.getExtent(parameterClass, false);
Query toBeDelete = pm.newQuery(parameterClass, toBeDeleted);
toBeDelete.deletePersistentAll();

This doesn't require that the query be executed except for the purposes of calling the jdoPreDelete callback, which is not an issue in the TCK.

Does JPOX support this? Would it help (I'm thinking of the issue with CompletenessTest not cleaning up because of issues with loading the instances).

Craig

Craig Russell
Architect, Sun Java Enterprise System http://java.sun.com/products/jdo
408 276-5638 mailto:[EMAIL PROTECTED]
P.S. A good JDO? O, Gasp!


Reply via email to