Skip to content

Commit 291e441

Browse files
committed
HHH-19846 Drop JUnit 4 usage
1 parent a129e23 commit 291e441

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

hibernate-core/src/test/java/org/hibernate/orm/test/serialization/ProxySerializationNoSessionFactoryTest.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ public void testInitializedProxy() {
4343
}
4444

4545
private void executeTest(boolean initializeProxy) {
46+
SessionFactoryRegistry.INSTANCE.clearRegistrations();
4647
final Configuration cfg = new Configuration()
4748
.setProperty( AvailableSettings.HBM2DDL_AUTO, Action.ACTION_CREATE_THEN_DROP )
4849
.addAnnotatedClass( SimpleEntity.class )

hibernate-core/src/test/java/org/hibernate/orm/test/serialization/SessionFactorySerializationTest.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
import org.hibernate.testing.orm.junit.BaseUnitTest;
1414
import org.hibernate.testing.util.ServiceRegistryUtil;
1515
import org.hibernate.type.SerializationException;
16+
import org.junit.jupiter.api.BeforeAll;
1617
import org.junit.jupiter.api.Test;
1718

1819
import static org.assertj.core.api.Assertions.assertThat;
@@ -26,6 +27,11 @@
2627
public class SessionFactorySerializationTest {
2728
public static final String NAME = "mySF";
2829

30+
@BeforeAll
31+
public void clearRegistry() {
32+
SessionFactoryRegistry.INSTANCE.clearRegistrations();
33+
}
34+
2935
@Test
3036
public void testNamedSessionFactorySerialization() {
3137
Configuration cfg = new Configuration()

0 commit comments

Comments
 (0)