File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed
hibernate-reactive-core/src/test/java/org/hibernate/reactive Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change 9
9
import java .util .List ;
10
10
import java .util .Objects ;
11
11
12
+ import org .junit .After ;
12
13
import org .junit .Test ;
13
14
14
15
import io .vertx .ext .unit .TestContext ;
@@ -25,6 +26,13 @@ protected Collection<Class<?>> annotatedEntities() {
25
26
return List .of ( PersonDetails .class , Person .class );
26
27
}
27
28
29
+ @ After
30
+ public void cleanDb (TestContext context ) {
31
+ test ( context , getSessionFactory ()
32
+ .withTransaction ( s -> s .createQuery ( "delete from PersonDetails" ).executeUpdate ()
33
+ .thenCompose ( v -> s .createQuery ( "delete from Person" ).executeUpdate () ) ) );
34
+ }
35
+
28
36
@ Test
29
37
public void verifyParentKeyIsSet (TestContext context ) {
30
38
Person person = new Person ( "Joshua" , 1 );
You can’t perform that action at this time.
0 commit comments