Skip to content

Commit 80f1c12

Browse files
geoandDavideD
authored andcommitted
Fix MutinyExceptionsTest
Hibernate ORM no longer wraps HibernateException in a PersistenceException, as per HHH-15797
1 parent bf917b9 commit 80f1c12

File tree

1 file changed

+1
-28
lines changed

1 file changed

+1
-28
lines changed

hibernate-reactive-core/src/test/java/org/hibernate/reactive/MutinyExceptionsTest.java

Lines changed: 1 addition & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
import java.util.List;
1010

1111
import org.hibernate.HibernateException;
12-
import org.hibernate.cfg.Configuration;
1312
import org.hibernate.reactive.mutiny.Mutiny;
1413

1514
import org.junit.Test;
@@ -18,7 +17,6 @@
1817
import jakarta.persistence.Column;
1918
import jakarta.persistence.Entity;
2019
import jakarta.persistence.Id;
21-
import jakarta.persistence.PersistenceException;
2220

2321
public class MutinyExceptionsTest extends BaseReactiveTest {
2422

@@ -27,15 +25,8 @@ protected Collection<Class<?>> annotatedEntities() {
2725
return List.of( Person.class );
2826
}
2927

30-
@Override
31-
protected Configuration constructConfiguration() {
32-
Configuration configuration = super.constructConfiguration();
33-
configuration.setProperty( "native_exception_handling_51_compliance", "false" );
34-
return configuration;
35-
}
36-
3728
Class<?> getExpectedException() {
38-
return PersistenceException.class;
29+
return HibernateException.class;
3930
}
4031

4132
@Test
@@ -75,22 +66,4 @@ public String toString() {
7566
return name + ", " + uniqueName;
7667
}
7768
}
78-
79-
// TODO: [ORM-6] Check if this property still makes sense
80-
// I don't think we need to support this case but at the moment it would require more work to
81-
// disable the behaviour.
82-
public static class Native51ExceptionHandlingTest extends MutinyExceptionsTest {
83-
84-
@Override
85-
Class<?> getExpectedException() {
86-
return HibernateException.class;
87-
}
88-
89-
@Override
90-
protected Configuration constructConfiguration() {
91-
Configuration configuration = super.constructConfiguration();
92-
configuration.setProperty( "native_exception_handling_51_compliance", "true" );
93-
return configuration;
94-
}
95-
}
9669
}

0 commit comments

Comments
 (0)