Package org.hibernate.testing.junit4
Class BaseCoreFunctionalTestCase
java.lang.Object
org.hibernate.testing.junit4.BaseUnitTestCase
org.hibernate.testing.junit4.BaseCoreFunctionalTestCase
Applies functional testing logic for core Hibernate testing on top of
BaseUnitTestCase
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Dialect
protected static final Class<?>[]
protected static final String[]
protected Session
static final String
Fields inherited from class org.hibernate.testing.junit4.BaseUnitTestCase
executorService, globalTimeout, log
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
addMappings
(Configuration configuration) protected void
afterConfigurationBuilt
(Configuration configuration) protected void
final void
protected void
applyCacheSettings
(Configuration configuration) protected void
final void
protected BootstrapServiceRegistry
protected StandardServiceRegistryImpl
buildServiceRegistry
(BootstrapServiceRegistry bootRegistry, Configuration configuration) protected void
protected void
buildSessionFactory
(Consumer<Configuration> configurationAdapter) protected void
protected void
protected void
protected Configuration
protected void
configure
(Configuration configuration) protected Configuration
constructAndConfigureConfiguration
(BootstrapServiceRegistry bootstrapServiceRegistry) protected Configuration
constructConfiguration
(BootstrapServiceRegistry bootstrapServiceRegistry) protected boolean
protected String
Feature supported only by H2 dialect.protected <T> T
fromTransaction
(Function<SessionImplementor, T> action) protected Class<?>[]
protected String[]
protected String
protected String
protected static Dialect
protected String[]
protected String[]
protected void
inSession
(Consumer<SessionImplementor> action) protected void
inStatelessSession
(Consumer<StatelessSession> action) protected void
inTransaction
(Consumer<SessionImplementor> action) protected void
inTransaction
(SessionImplementor session, Consumer<SessionImplementor> action) protected boolean
protected boolean
void
protected Session
protected Session
openSession
(Interceptor interceptor) protected void
prepareBasicRegistryBuilder
(StandardServiceRegistryBuilder serviceRegistryBuilder) protected void
protected void
protected boolean
readCommittedIsolationMaintained
(String scenario) protected void
protected void
rebuildSessionFactory
(Consumer<Configuration> configurationAdapter) protected boolean
protected void
protected StandardServiceRegistryImpl
protected SessionFactoryImplementor
Methods inherited from class org.hibernate.testing.junit4.BaseUnitTestCase
assertNoLeaks, executeAsync, executeSync, releaseTransactions, sleep
-
Field Details
-
VALIDATE_DATA_CLEANUP
- See Also:
-
DIALECT
-
session
-
NO_MAPPINGS
-
NO_CLASSES
-
-
Constructor Details
-
BaseCoreFunctionalTestCase
public BaseCoreFunctionalTestCase()
-
-
Method Details
-
getDialect
-
configuration
-
serviceRegistry
-
sessionFactory
-
openSession
- Throws:
HibernateException
-
openSession
- Throws:
HibernateException
-
buildSessionFactory
protected void buildSessionFactory() -
buildSessionFactory
-
rebuildSessionFactory
protected void rebuildSessionFactory() -
rebuildSessionFactory
-
constructAndConfigureConfiguration
protected Configuration constructAndConfigureConfiguration(BootstrapServiceRegistry bootstrapServiceRegistry) -
constructConfiguration
-
configure
-
addMappings
-
getMappings
-
getBaseForMappings
-
getAnnotatedClasses
-
getAnnotatedPackages
-
getOrmXmlFiles
-
applyCacheSettings
-
getCacheConcurrencyStrategy
-
afterConfigurationBuilt
-
buildBootstrapServiceRegistry
-
prepareBootstrapRegistryBuilder
-
buildServiceRegistry
protected StandardServiceRegistryImpl buildServiceRegistry(BootstrapServiceRegistry bootRegistry, Configuration configuration) -
prepareBasicRegistryBuilder
-
afterSessionFactoryBuilt
protected void afterSessionFactoryBuilt() -
createSchema
protected boolean createSchema() -
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() -
beforeTest
- Throws:
Exception
-
prepareTest
- Throws:
Exception
-
afterTest
- Throws:
Exception
-
cleanupCache
protected void cleanupCache() -
isCleanupTestDataRequired
protected boolean isCleanupTestDataRequired() -
isCleanupTestDataUsingBulkDelete
protected boolean isCleanupTestDataUsingBulkDelete() -
cleanupTestData
- Throws:
Exception
-
cleanupTest
- Throws:
Exception
-
assertAllDataRemoved
protected void assertAllDataRemoved() -
readCommittedIsolationMaintained
-
inTransaction
-
fromTransaction
-
inTransaction
-
inSession
-
inStatelessSession
-