HHH-13663 Have the test actually use ThreadLocalSessionContext

This commit is contained in:
Sanne Grinovero 2019-10-11 10:55:07 +01:00
parent 1d64a386cd
commit 14b6330a32
1 changed files with 4 additions and 3 deletions

View File

@ -29,9 +29,10 @@ public class TestHibernateFlushModeOnThreadLocalInactiveTransaction extends Base
@Test
public void testHibernateFlushModeOnInactiveTransaction() {
Session s = openSession();
//s.setFlushMode(FlushMode.AUTO); // this does not throw (API is deprecated)
s.setHibernateFlushMode( FlushMode.AUTO ); // this should not throw even within an inactive transaction
try ( Session s = sessionFactory().getCurrentSession() ) {
//s.setFlushMode( FlushMode.AUTO ); // this does not throw (API is deprecated)
s.setHibernateFlushMode( FlushMode.AUTO ); // this should not throw even within an inactive transaction
}
}
}