HHH-11271 : Add CacheTestUtil#sfOptionsForStart
This commit is contained in:
parent
a6ea139539
commit
0b99d306a4
|
@ -18,6 +18,7 @@ import org.hibernate.boot.internal.SessionFactoryBuilderImpl;
|
||||||
import org.hibernate.boot.internal.SessionFactoryOptionsImpl;
|
import org.hibernate.boot.internal.SessionFactoryOptionsImpl;
|
||||||
import org.hibernate.boot.registry.StandardServiceRegistry;
|
import org.hibernate.boot.registry.StandardServiceRegistry;
|
||||||
import org.hibernate.boot.registry.StandardServiceRegistryBuilder;
|
import org.hibernate.boot.registry.StandardServiceRegistryBuilder;
|
||||||
|
import org.hibernate.boot.spi.SessionFactoryOptions;
|
||||||
import org.hibernate.cache.infinispan.InfinispanRegionFactory;
|
import org.hibernate.cache.infinispan.InfinispanRegionFactory;
|
||||||
import org.hibernate.cfg.AvailableSettings;
|
import org.hibernate.cfg.AvailableSettings;
|
||||||
import org.hibernate.cfg.Environment;
|
import org.hibernate.cfg.Environment;
|
||||||
|
@ -28,6 +29,7 @@ import org.hibernate.internal.util.compare.EqualsHelper;
|
||||||
import org.hibernate.resource.transaction.backend.jdbc.internal.JdbcResourceLocalTransactionCoordinatorBuilderImpl;
|
import org.hibernate.resource.transaction.backend.jdbc.internal.JdbcResourceLocalTransactionCoordinatorBuilderImpl;
|
||||||
import org.hibernate.resource.transaction.backend.jta.internal.JtaTransactionCoordinatorBuilderImpl;
|
import org.hibernate.resource.transaction.backend.jta.internal.JtaTransactionCoordinatorBuilderImpl;
|
||||||
import org.hibernate.service.ServiceRegistry;
|
import org.hibernate.service.ServiceRegistry;
|
||||||
|
import org.hibernate.testing.boot.ServiceRegistryTestingImpl;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Utilities for cache testing.
|
* Utilities for cache testing.
|
||||||
|
@ -203,6 +205,14 @@ public class CacheTestUtil {
|
||||||
throw new TimeoutException();
|
throw new TimeoutException();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static SessionFactoryOptions sfOptionsForStart() {
|
||||||
|
return new SessionFactoryOptionsImpl(
|
||||||
|
new SessionFactoryBuilderImpl.SessionFactoryOptionsStateStandardImpl(
|
||||||
|
ServiceRegistryTestingImpl.forUnitTesting()
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Prevent instantiation.
|
* Prevent instantiation.
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in New Issue