mirror of
https://github.com/apache/openjpa.git
synced 2025-02-21 17:45:51 +00:00
force cleaning of the table to have re-runnable tests
This commit is contained in:
parent
40d19ebc6c
commit
03ebe4fdd0
@ -29,13 +29,18 @@ import javax.validation.ConstraintViolationException;
|
||||
|
||||
import org.apache.openjpa.example.gallery.model.Image;
|
||||
import org.apache.openjpa.example.gallery.model.Location;
|
||||
import org.junit.Test;
|
||||
|
||||
import static org.junit.Assert.fail;
|
||||
|
||||
public class TestJPAValidation {
|
||||
|
||||
public class TestJPAValidation extends junit.framework.TestCase {
|
||||
|
||||
/**
|
||||
* Shows usage of BV constraints with JPA at pre-update, pre-remove,
|
||||
* and pre-persist lifecycle events.
|
||||
*/
|
||||
@Test
|
||||
public void testValidation() {
|
||||
EntityManagerFactory emf =
|
||||
Persistence.createEntityManagerFactory("BeanValidation");
|
||||
|
@ -43,7 +43,8 @@
|
||||
<property name="openjpa.ConnectionURL"
|
||||
value="jdbc:derby:target/database/ImageDB;create=true" />
|
||||
-->
|
||||
<property name="openjpa.jdbc.SynchronizeMappings" value="buildSchema(ForeignKeys=true)"/>
|
||||
<!-- we synchronise the table schema and delete their table contents for repeatable tests -->
|
||||
<property name="openjpa.jdbc.SynchronizeMappings" value="buildSchema(ForeignKeys=true,SchemaAction='add,deleteTableContents')"/>
|
||||
<property name="openjpa.DynamicEnhancementAgent" value="false"/>
|
||||
|
||||
<property name="javax.persistence.validation.group.pre-persist"
|
||||
|
Loading…
x
Reference in New Issue
Block a user