Package org.hibernate.testing.junit4
Class BaseCoreFunctionalTestCase
- java.lang.Object
-
- org.hibernate.testing.junit4.BaseUnitTestCase
-
- org.hibernate.testing.junit4.BaseCoreFunctionalTestCase
-
public abstract class BaseCoreFunctionalTestCase extends BaseUnitTestCase
Applies functional testing logic for core Hibernate testing on top ofBaseUnitTestCase
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
BaseCoreFunctionalTestCase.RollbackWork
-
Field Summary
Fields Modifier and Type Field Description static Dialect
DIALECT
protected static Class<?>[]
NO_CLASSES
protected static String[]
NO_MAPPINGS
protected Session
session
static String
VALIDATE_DATA_CLEANUP
-
Fields inherited from class org.hibernate.testing.junit4.BaseUnitTestCase
executorService, globalTimeout, log
-
-
Constructor Summary
Constructors Constructor Description BaseCoreFunctionalTestCase()
-
Method Summary
-
Methods inherited from class org.hibernate.testing.junit4.BaseUnitTestCase
assertNoLeaks, checkClearSchema, executeAsync, executeSync, releaseTransactions, sleep
-
-
-
-
Field Detail
-
VALIDATE_DATA_CLEANUP
public static final String VALIDATE_DATA_CLEANUP
- See Also:
- Constant Field Values
-
DIALECT
public static final Dialect DIALECT
-
session
protected Session session
-
NO_MAPPINGS
protected static final String[] NO_MAPPINGS
-
NO_CLASSES
protected static final Class<?>[] NO_CLASSES
-
-
Method Detail
-
getDialect
protected static Dialect getDialect()
-
configuration
protected Configuration configuration()
-
serviceRegistry
protected StandardServiceRegistryImpl serviceRegistry()
-
sessionFactory
protected SessionFactoryImplementor sessionFactory()
-
openSession
protected Session openSession() throws HibernateException
- Throws:
HibernateException
-
openSession
protected Session openSession(Interceptor interceptor) throws HibernateException
- Throws:
HibernateException
-
buildSessionFactory
protected void buildSessionFactory()
-
buildSessionFactory
protected void buildSessionFactory(Consumer<Configuration> configurationAdapter)
-
rebuildSessionFactory
protected void rebuildSessionFactory()
-
rebuildSessionFactory
protected void rebuildSessionFactory(Consumer<Configuration> configurationAdapter)
-
constructAndConfigureConfiguration
protected Configuration constructAndConfigureConfiguration(BootstrapServiceRegistry bootstrapServiceRegistry)
-
constructConfiguration
protected Configuration constructConfiguration(BootstrapServiceRegistry bootstrapServiceRegistry)
-
configure
protected void configure(Configuration configuration)
-
addMappings
protected void addMappings(Configuration configuration)
-
getMappings
protected String[] getMappings()
-
getBaseForMappings
protected String getBaseForMappings()
-
getAnnotatedClasses
protected Class<?>[] getAnnotatedClasses()
-
getAnnotatedPackages
protected String[] getAnnotatedPackages()
-
getOrmXmlFiles
protected String[] getOrmXmlFiles()
-
applyCacheSettings
protected void applyCacheSettings(Configuration configuration)
-
getCacheConcurrencyStrategy
protected String getCacheConcurrencyStrategy()
-
afterConfigurationBuilt
protected void afterConfigurationBuilt(Configuration configuration)
-
buildBootstrapServiceRegistry
protected BootstrapServiceRegistry buildBootstrapServiceRegistry()
-
prepareBootstrapRegistryBuilder
protected void prepareBootstrapRegistryBuilder(BootstrapServiceRegistryBuilder builder)
-
buildServiceRegistry
protected StandardServiceRegistryImpl buildServiceRegistry(BootstrapServiceRegistry bootRegistry, Configuration configuration)
-
prepareBasicRegistryBuilder
protected void prepareBasicRegistryBuilder(StandardServiceRegistryBuilder serviceRegistryBuilder)
-
afterSessionFactoryBuilt
protected void afterSessionFactoryBuilt()
-
createSchema
protected boolean createSchema()
-
createSecondSchema
protected String createSecondSchema()
Feature supported only by H2 dialect.- Returns:
- Provide not empty name to create second schema.
-
rebuildSessionFactoryOnError
protected boolean rebuildSessionFactoryOnError()
-
releaseSessionFactory
protected void releaseSessionFactory()
-
onFailure
public void onFailure()
-
cleanupCache
protected void cleanupCache()
-
isCleanupTestDataRequired
protected boolean isCleanupTestDataRequired()
-
isCleanupTestDataUsingBulkDelete
protected boolean isCleanupTestDataUsingBulkDelete()
-
assertAllDataRemoved
protected void assertAllDataRemoved()
-
readCommittedIsolationMaintained
protected boolean readCommittedIsolationMaintained(String scenario)
-
inTransaction
protected void inTransaction(Consumer<SessionImplementor> action)
-
fromTransaction
protected <T> T fromTransaction(Function<SessionImplementor,T> action)
-
inTransaction
protected void inTransaction(SessionImplementor session, Consumer<SessionImplementor> action)
-
inSession
protected void inSession(Consumer<SessionImplementor> action)
-
inStatelessSession
protected void inStatelessSession(Consumer<StatelessSession> action)
-
-