This content has been marked as final.
Show 3 replies
-
1. Re: Alternative persistence.xml for TestNG suite
amitev Oct 11, 2010 9:16 AM (in response to bartmatthaei)There isn't a way to provide an alternative persistence.xml but there is a way to provide an alternative DataSource which is enough in your case. Put the datasource in the classpath of your integration test project.
-
2. Re: Alternative persistence.xml for TestNG suite
bartmatthaei Oct 11, 2010 10:46 AM (in response to bartmatthaei)Alternative DataSource isn't enough, since the dialect also needs to change (from MySQL to HSSQL). Or can I specify this in the datasource somehow?
-
3. Re: Alternative persistence.xml for TestNG suite
kapitanpetko Oct 11, 2010 9:39 PM (in response to bartmatthaei)Use Maven (or Ant or whatever) filtering to change your xml/propeties files before the tests run. Something like this, where ${hibernate.dialect} changes from mysql to hsql.
<property name="hibernate.dialect" value="${hibernate.dialect}" />
HTH