[jboss-user] [JBoss Tools (users)] - Re: Overriding an EJB datasource for testing
nickarls
do-not-reply at jboss.com
Tue May 19 06:30:09 EDT 2009
I'm trying a similar setup with a Seam WAR.
I have a prod persistence.xml which defines a java:/ProdDatasource. In the same dir I have a persistence.xml with
| hibernate.dialect=org.hibernate.dialect.Oracle10gDialect
| hibernate.hbm2ddl.auto=validate
|
and then in my test project I have in my bootstrap/persistence.properties
| hibernate.dialect=org.hibernate.dialect.HSQLDialect
| hibernate.hbm2ddl.auto=create-drop
|
and by DB testng.xml does
| <parameter name="datasourceJndiName" value="java:/DefaultDS" />
| <parameter name="database" value="HSQL" />
| <parameter name="binaryDir" value="" />
|
and the import in the test class
| @Override
| protected void prepareDBUnitOperations()
| {
| beforeTestOperations.add(new DataSetOperation("path/to/my/BaseData.xml"));
| }
|
but the strange result is that I get Oracle create-errors and then I get another error for table not found when the import is attempted.
Any pointers are appreciated,
Nik
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4231838#4231838
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4231838
More information about the jboss-user
mailing list