For any case I created the ticket (including the patch), see
https://issues.apache.org/jira/browse/CAMEL-4273 feel free to include the
patch or ignore/close the ticket.

> For unit tests I doubt it have any effect, as the unit test is short
> lived and executed once when testing. In camel-core it could be
> another matter as that code is what you run in production.

Indeed it happened to me while I was working on my project, while running
'mvn install' on one terminal, accidentally I ran the same test case inside
IDE. The tests had to do with my routes (containing camel-jpa component
using filesystem-based-hsql-db locally). At the start-up of the test cases I
used to cleanup the hsql-database on the file-system (@BeforeClass) to avoid
any side-effect of the previous run (using TestSupport.deleteDirectory())
and the assertions of my test-cases failed until I realized the other
terminal with transactions running on the *same* hsql-db using the *same*
test-data. So to say suddently I got 2 rows fulfilling the jpa-query instead
of only expected one row.

So I just copy/pasted TestSupport.deleteDirectory() into my utility-class
and adapted with that assertTrue so that by the next accident I realize that
before it baffles me.

Regards, Babak 

--
View this message in context: 
http://camel.465427.n5.nabble.com/Favor-static-member-classes-over-nonstatic-tp4634964p4635206.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to