Skip to content

Commit 34f5c57

Browse files
committed
Add SessionFactoryManager#isStarted()
The DatabaseSelectionRule might not start our SessionFactoryManager but a test might won't to access the factory in a `@AfterClass` method. This method allows to check if the SessionFactoryManager is started before requesting a SessionFactory.
1 parent dd5be42 commit 34f5c57

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

hibernate-reactive-core/src/test/java/org/hibernate/reactive/testing/SessionFactoryManager.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@ public void start(Supplier<SessionFactory> supplier) {
3535
}
3636
}
3737

38+
public boolean isStarted() {
39+
return sessionFactory != null;
40+
}
41+
3842
public SessionFactory getHibernateSessionFactory() {
3943
return sessionFactory;
4044
}

0 commit comments

Comments
 (0)