Dont add the second one in test ;) To change properties system properties works fine, to change the whole model appcomposer or arquillian are solid solutions, last alternative is one openejb observer changing the pu on the fly but guess it is not needed for you.
Le 25 août 2016 18:26, "dimas" <[email protected]> a écrit : > When I remove the persistence.xml from tests resources everything works, so > CDI is initialised. > Here is the log entry that i missed before: > > SEVERE: FAIL ... customer-rebates-automation: @PersistenceUnit unitName > has > multiple matches: unitName "cra" has 2 possible matches. > > > There are two persistence.xml's in the classpath (one from main another > from > tests). Is there any way to have only one? > > > > -- > View this message in context: http://tomee-openejb.979440. > n4.nabble.com/persistence-xml-for-unit-tests-tp4679874p4679898.html > Sent from the TomEE Users mailing list archive at Nabble.com. >
