jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bear Giles <bgi...@coyotesong.com>
Subject Re: How to delete transient repository?
Date Tue, 11 Aug 2009 21:17:23 GMT
Hee.  It gets better.

I have two unit tests now.  One tests the DAO that wraps access to 
unversioned nt:resources, the second tests the DAO that wraps access to 
versioned nt:resources.

Either test, by itself, works.

Both run (via the eclipse junit test on a source folder) has the second 
one fails.  I don't know if it's due to the test itself or merely its 
position as second.  The error is on teardown - I can't delete the 
repository files.

However if I comment out a final method that simply reads the properties 
of the jcr:content associated with a specified node then both tests 
succeed.  I've single-stepped through the code and I'm not throwing any 
unexpected exceptions that would prevent the session from being properly 
closed.  Plus I -know- that the unit test succeeds when I run it by itself.

My only idea was that there's a race condition where the second unit 
test is trying to use a repository directory with the same name as the 
first unit test, but that doesn't hold up either since I get the problem 
even when I append a random number to the directory name.

Could there be other race conditions in transient repositories?

Bear

Mime
View raw message