Hi

this way to test is kind of legacy, you can have a look to
http://tomee.apache.org/ng/developer/testing/index.html

System properties will still override the persistence unit values. IIRC you
can also use placeholders if you deploy in tomee too
(value="${systemproperty key}")


Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> |  Blog
<https://blog-rmannibucau.rhcloud.com> | Old Wordpress Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber
<http://www.tomitribe.com> | JavaEE Factory
<https://javaeefactory-rmannibucau.rhcloud.com>

2016-08-25 1:02 GMT+02:00 dimas <[email protected]>:

> Hi,
>
> I want to use different db dialect in my unit tests (because I want to use
> in Hsql instead of Postgres). In order to do that i have to change the
> 'hibernate-dialect' persistence-unit property. Found this page:
> http://tomee.apache.org/configuring-persistenceunits-in-tests.html
>
> But I'm not sure how to initialise the InitialContext in my tests (run by
> Deltaspike test control). Or may be there is a different way to approach
> this.
>
> Dmitry
>
>
>
> --
> View this message in context: http://tomee-openejb.979440.
> n4.nabble.com/persistence-xml-for-unit-tests-tp4679874.html
> Sent from the TomEE Users mailing list archive at Nabble.com.
>

Reply via email to