OK, what I found out until now: - All test classes of the Camel LevelDB component contain only 1 Test - The POM of the component contains a surefire config "<forkMode>pertest</forkMode>" => what means the same as "<forkMode>always</forkMode>" => what means "fork for each test-class" (yes, the term "pertest" is very confusing)
Therefore I guess the developers of the component had the same problems. But that means that in Eclipse only 1 Test can run in the same test-run, because the JUnit-Testrunner of Eclipse has no configuration to fork the tests. Stephan On Tue, Jan 21, 2014 at 1:04 PM, Stephan Burkard <sburk...@gmail.com> wrote: > Hi Camel users > > I ran into another problem with the LevelDB aggregator persistence. The > error I get is "Error opening LevelDB with file [path to > persistentFileName]". The cause of it is "LOCK: already held by process". > > This happens when I run multiple route tests using CamelSpringTestSupport. > > The individual tests run fine, if they run in the same test-run, the first > succeeds and the rest fails with the error above. > > Since the Camel context is restarted per test, I also remove the whole > directory with the levelDB file in the @Before method of my test-classes, > so that the DB is "blank" for every test method. > > Is this a wrong behaviour for the tests? What is the best practice to have > a new LevelDB for every test case. > > Thanks for any help > Stephan > >