Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[eclipselink-users] Transactional Testing in Spring

I'm having a problem doing some integration testing in spring with transactions.

I've got my test case that injects a DAO. I want to verify that a
unique constraint occurs on insert, well since eclipselink is smart
enough to not bother sending the SQL until a commit happens my SQL is
never executed.

How are people working around this? Are you somehow loading a
different persistence.xml that changes the caching behavior when
testing?

I would prefer to not have to do a commit and a delete to test an insert...

Ideas?

Thanks,
Tim


Back to the top