AnsweredAssumed Answered

Why h2 db is not cleaned between tests

Question asked by albertorugnone1 on Oct 21, 2012
Latest reply on Oct 24, 2012 by frederikheremans1
Hello everybody. :D
It is the first time I post here, I hope you could help me. :mrgreen:
Working on tests of my project built on engine API, as usual practice I built a big amount of unit test to take control of development. Each test works fine alone but not in a suite. :?

I tried with some test form Activiti in Action book and the result is the same.
Looking in deep seems that h2 db is not cleaned between tests. I am not expert of h2 use in the test but honestly I expected  it would create a new instance or at least be cleaned between tests.
Debugging the code, I see that  ActivitiRule, in the finished method calls  TestHelper.annotationDeploymentTearDownIn, which calls  deleteDeployment. This means that IdentityService, HistoricService in my understanding.

This is in my understanding.
Then the question how I can take h2 db cleaned between tests (or also how I can have test not depending by each others)??
Please help me, I really don't know how solve this issues.

Alberto  :ugeek: