remove dependency on hibernate-core tests from hibernate-envers
This commit is contained in:
parent
1c100f5af0
commit
d16073f7ce
|
@ -12,6 +12,8 @@ import java.util.Map;
|
|||
import org.hibernate.jpa.boot.spi.Bootstrap;
|
||||
import org.hibernate.jpa.boot.spi.PersistenceUnitDescriptor;
|
||||
|
||||
import org.hibernate.testing.orm.jpa.PersistenceUnitDescriptorAdapter;
|
||||
|
||||
/**
|
||||
* @author Steve Ebersole
|
||||
*/
|
||||
|
|
|
@ -42,7 +42,7 @@ import org.hibernate.engine.spi.SessionFactoryImplementor;
|
|||
import org.hibernate.jpa.AvailableSettings;
|
||||
import org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl;
|
||||
import org.hibernate.jpa.boot.spi.Bootstrap;
|
||||
import org.hibernate.jpa.test.PersistenceUnitDescriptorAdapter;
|
||||
import org.hibernate.testing.orm.jpa.PersistenceUnitDescriptorAdapter;
|
||||
import org.hibernate.type.AbstractSingleColumnStandardBasicType;
|
||||
import org.hibernate.type.descriptor.ValueBinder;
|
||||
import org.hibernate.type.descriptor.ValueExtractor;
|
||||
|
|
|
@ -18,7 +18,7 @@ import org.hibernate.cfg.AvailableSettings;
|
|||
import org.hibernate.cfg.Environment;
|
||||
import org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl;
|
||||
import org.hibernate.jpa.boot.spi.Bootstrap;
|
||||
import org.hibernate.jpa.test.PersistenceUnitInfoAdapter;
|
||||
import org.hibernate.testing.orm.jpa.PersistenceUnitInfoAdapter;
|
||||
import org.hibernate.mapping.PersistentClass;
|
||||
import org.hibernate.testing.cache.CachingRegionFactory;
|
||||
import org.hibernate.testing.orm.junit.BaseUnitTest;
|
||||
|
|
|
@ -12,7 +12,7 @@ import javax.persistence.EntityManagerFactory;
|
|||
|
||||
import org.hibernate.jpa.AvailableSettings;
|
||||
import org.hibernate.jpa.HibernatePersistenceProvider;
|
||||
import org.hibernate.jpa.test.PersistenceUnitInfoAdapter;
|
||||
import org.hibernate.testing.orm.jpa.PersistenceUnitInfoAdapter;
|
||||
|
||||
/**
|
||||
* @author Steve Ebersole
|
||||
|
|
|
@ -14,7 +14,7 @@ import org.hibernate.HibernateException;
|
|||
import org.hibernate.cfg.AvailableSettings;
|
||||
import org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl;
|
||||
import org.hibernate.jpa.boot.spi.Bootstrap;
|
||||
import org.hibernate.jpa.test.PersistenceUnitInfoAdapter;
|
||||
import org.hibernate.testing.orm.jpa.PersistenceUnitInfoAdapter;
|
||||
|
||||
import org.hibernate.testing.orm.junit.BaseUnitTest;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
|
|
@ -19,12 +19,11 @@ import org.hibernate.boot.SessionFactoryBuilder;
|
|||
import org.hibernate.boot.registry.StandardServiceRegistryBuilder;
|
||||
import org.hibernate.boot.registry.internal.StandardServiceRegistryImpl;
|
||||
import org.hibernate.cfg.Environment;
|
||||
import org.hibernate.dialect.Dialect;
|
||||
import org.hibernate.jpa.AvailableSettings;
|
||||
import org.hibernate.jpa.boot.spi.Bootstrap;
|
||||
import org.hibernate.jpa.test.Distributor;
|
||||
import org.hibernate.jpa.test.Item;
|
||||
import org.hibernate.jpa.test.PersistenceUnitDescriptorAdapter;
|
||||
import org.hibernate.testing.orm.jpa.PersistenceUnitDescriptorAdapter;
|
||||
import org.hibernate.jpa.test.SettingsGenerator;
|
||||
|
||||
import org.hibernate.testing.orm.junit.DialectContext;
|
||||
|
|
|
@ -13,7 +13,7 @@ import org.hibernate.cfg.AvailableSettings;
|
|||
import org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl;
|
||||
import org.hibernate.jpa.boot.spi.Bootstrap;
|
||||
import org.hibernate.jpa.test.MyNamingStrategy;
|
||||
import org.hibernate.jpa.test.PersistenceUnitInfoAdapter;
|
||||
import org.hibernate.testing.orm.jpa.PersistenceUnitInfoAdapter;
|
||||
|
||||
import org.hibernate.testing.orm.junit.BaseUnitTest;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
|
|
@ -37,7 +37,7 @@ import org.hibernate.id.IdentifierGenerator;
|
|||
import org.hibernate.internal.FilterAliasGenerator;
|
||||
import org.hibernate.jpa.AvailableSettings;
|
||||
import org.hibernate.jpa.boot.spi.Bootstrap;
|
||||
import org.hibernate.jpa.test.PersistenceUnitDescriptorAdapter;
|
||||
import org.hibernate.testing.orm.jpa.PersistenceUnitDescriptorAdapter;
|
||||
import org.hibernate.jpa.test.SettingsGenerator;
|
||||
import org.hibernate.mapping.Collection;
|
||||
import org.hibernate.mapping.PersistentClass;
|
||||
|
|
|
@ -15,7 +15,7 @@ import org.junit.jupiter.api.Test;
|
|||
|
||||
import org.hibernate.SessionFactory;
|
||||
import org.hibernate.SessionFactoryObserver;
|
||||
import org.hibernate.jpa.test.PersistenceUnitInfoAdapter;
|
||||
import org.hibernate.testing.orm.jpa.PersistenceUnitInfoAdapter;
|
||||
import org.hibernate.jpa.AvailableSettings;
|
||||
import org.hibernate.jpa.boot.spi.Bootstrap;
|
||||
import org.hibernate.jpa.boot.spi.EntityManagerFactoryBuilder;
|
||||
|
|
|
@ -13,7 +13,7 @@ import java.util.Collections;
|
|||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import org.hibernate.jpa.test.PersistenceUnitInfoAdapter;
|
||||
import org.hibernate.testing.orm.jpa.PersistenceUnitInfoAdapter;
|
||||
import org.hibernate.jpa.AvailableSettings;
|
||||
import org.hibernate.jpa.boot.spi.Bootstrap;
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@ import java.util.Map;
|
|||
|
||||
import org.hibernate.cfg.AvailableSettings;
|
||||
import org.hibernate.jpa.boot.spi.Bootstrap;
|
||||
import org.hibernate.jpa.test.PersistenceUnitDescriptorAdapter;
|
||||
import org.hibernate.testing.orm.jpa.PersistenceUnitDescriptorAdapter;
|
||||
|
||||
import org.hibernate.testing.orm.junit.BaseUnitTest;
|
||||
import org.hibernate.testing.orm.junit.FailureExpected;
|
||||
|
|
|
@ -18,10 +18,9 @@ import javax.persistence.EntityManagerFactory;
|
|||
import javax.persistence.RollbackException;
|
||||
|
||||
import org.hibernate.cfg.Environment;
|
||||
import org.hibernate.dialect.Dialect;
|
||||
import org.hibernate.engine.jdbc.connections.internal.DriverManagerConnectionProviderImpl;
|
||||
import org.hibernate.jpa.boot.spi.Bootstrap;
|
||||
import org.hibernate.jpa.test.PersistenceUnitDescriptorAdapter;
|
||||
import org.hibernate.testing.orm.jpa.PersistenceUnitDescriptorAdapter;
|
||||
import org.hibernate.jpa.test.SettingsGenerator;
|
||||
|
||||
import org.hibernate.testing.TestForIssue;
|
||||
|
|
|
@ -13,7 +13,7 @@ import org.hibernate.boot.internal.SessionFactoryOptionsBuilder;
|
|||
import org.hibernate.cfg.AvailableSettings;
|
||||
import org.hibernate.internal.CoreMessageLogger;
|
||||
import org.hibernate.jpa.boot.spi.Bootstrap;
|
||||
import org.hibernate.jpa.test.PersistenceUnitDescriptorAdapter;
|
||||
import org.hibernate.testing.orm.jpa.PersistenceUnitDescriptorAdapter;
|
||||
import org.hibernate.orm.test.jpa.mapping.ColumnWithExplicitReferenceToPrimaryTableTest.AnEntity;
|
||||
import org.hibernate.testing.TestForIssue;
|
||||
import org.hibernate.testing.logger.LoggerInspectionRule;
|
||||
|
|
|
@ -11,11 +11,7 @@ apply from: rootProject.file( 'gradle/published-java-module.gradle' )
|
|||
apply plugin: 'org.hibernate.matrix-test'
|
||||
|
||||
dependencies {
|
||||
api( project( ':hibernate-core' ) ) {
|
||||
// Exclude access to this to avoid future use.
|
||||
// todo (6.0) : this should no longer be transitive from core. Come back and verify this
|
||||
exclude group: "org.javassist", module: "javassist"
|
||||
}
|
||||
api project( ':hibernate-core' )
|
||||
|
||||
implementation libraries.commons_annotations
|
||||
|
||||
|
@ -27,7 +23,6 @@ dependencies {
|
|||
annotationProcessor project( ':hibernate-jpamodelgen' )
|
||||
|
||||
testImplementation project( ':hibernate-testing' )
|
||||
testImplementation project( path: ':hibernate-core', configuration: 'tests' )
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
|
|
|
@ -30,7 +30,6 @@ import org.hibernate.jpa.AvailableSettings;
|
|||
import org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl;
|
||||
import org.hibernate.jpa.boot.spi.Bootstrap;
|
||||
import org.hibernate.jpa.boot.spi.PersistenceUnitDescriptor;
|
||||
import org.hibernate.jpa.test.PersistenceUnitDescriptorAdapter;
|
||||
import org.hibernate.query.sqm.mutation.internal.idtable.GlobalTemporaryTableStrategy;
|
||||
import org.hibernate.query.sqm.mutation.internal.idtable.LocalTemporaryTableStrategy;
|
||||
|
||||
|
@ -39,6 +38,7 @@ import org.hibernate.testing.BeforeClassOnce;
|
|||
import org.hibernate.testing.jdbc.SharedDriverManagerConnectionProviderImpl;
|
||||
import org.hibernate.testing.jta.TestingJtaPlatformImpl;
|
||||
import org.hibernate.testing.junit4.Helper;
|
||||
import org.hibernate.testing.orm.jpa.PersistenceUnitDescriptorAdapter;
|
||||
import org.hibernate.testing.orm.junit.DialectContext;
|
||||
import org.junit.After;
|
||||
|
||||
|
|
|
@ -31,8 +31,6 @@ import org.hibernate.testing.TestForIssue;
|
|||
import org.hibernate.testing.jta.TestingJtaBootstrap;
|
||||
import org.hibernate.testing.jta.TestingJtaPlatformImpl;
|
||||
|
||||
import org.hibernate.test.tm.JtaAfterCompletionTest;
|
||||
|
||||
import static org.hibernate.testing.junit4.ExtraAssertions.assertTyping;
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertNotNull;
|
||||
|
@ -41,8 +39,8 @@ import static org.junit.Assert.assertTrue;
|
|||
/**
|
||||
* An envers specific quest that verifies the {@link AuditProcessManager} gets flushed.
|
||||
*
|
||||
* There is a similar test called {@link JtaAfterCompletionTest}
|
||||
* in hibernate-core which verifies that the callbacks fires.
|
||||
* There is a similar to `org.hibernate.test.tm.JtaAfterCompletionTest` in hibernate-core
|
||||
* which verifies that the callbacks fires.
|
||||
*
|
||||
* The premise behind this test is to verify that when a JTA transaction is aborted by
|
||||
* Arjuna's reaper thread, the original thread will still invoke the after-completion
|
||||
|
|
|
@ -24,10 +24,10 @@ import org.hibernate.jpa.AvailableSettings;
|
|||
import org.hibernate.jpa.HibernateEntityManagerFactory;
|
||||
import org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl;
|
||||
import org.hibernate.jpa.boot.spi.Bootstrap;
|
||||
import org.hibernate.jpa.test.PersistenceUnitDescriptorAdapter;
|
||||
|
||||
import org.hibernate.testing.AfterClassOnce;
|
||||
import org.hibernate.testing.BeforeClassOnce;
|
||||
import org.hibernate.testing.orm.jpa.PersistenceUnitDescriptorAdapter;
|
||||
import org.hibernate.testing.orm.junit.DialectContext;
|
||||
import org.junit.Before;
|
||||
|
||||
|
|
|
@ -15,6 +15,8 @@ import org.gradle.api.model.ObjectFactory;
|
|||
import org.gradle.api.tasks.CacheableTask;
|
||||
import org.gradle.api.tasks.InputDirectory;
|
||||
import org.gradle.api.tasks.OutputDirectory;
|
||||
import org.gradle.api.tasks.PathSensitive;
|
||||
import org.gradle.api.tasks.PathSensitivity;
|
||||
import org.gradle.api.tasks.TaskAction;
|
||||
|
||||
import static org.hibernate.orm.jakarta.JakartaPlugin.JAKARTA;
|
||||
|
@ -36,6 +38,7 @@ public abstract class JakartaDirectoryTransformation extends DefaultTask {
|
|||
}
|
||||
|
||||
@InputDirectory
|
||||
@PathSensitive( PathSensitivity.RELATIVE )
|
||||
public DirectoryProperty getSourceDirectory() {
|
||||
return sourceDirectory;
|
||||
}
|
||||
|
|
|
@ -14,6 +14,8 @@ import org.gradle.api.model.ObjectFactory;
|
|||
import org.gradle.api.tasks.CacheableTask;
|
||||
import org.gradle.api.tasks.InputFile;
|
||||
import org.gradle.api.tasks.OutputFile;
|
||||
import org.gradle.api.tasks.PathSensitive;
|
||||
import org.gradle.api.tasks.PathSensitivity;
|
||||
import org.gradle.api.tasks.TaskAction;
|
||||
|
||||
import static org.hibernate.orm.jakarta.JakartaPlugin.JAKARTA;
|
||||
|
@ -35,6 +37,7 @@ public abstract class JakartaJarTransformation extends DefaultTask {
|
|||
}
|
||||
|
||||
@InputFile
|
||||
@PathSensitive( PathSensitivity.RELATIVE )
|
||||
public RegularFileProperty getSourceJar() {
|
||||
return sourceJar;
|
||||
}
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
/*
|
||||
* Hibernate, Relational Persistence for Idiomatic Java
|
||||
*
|
||||
* License: GNU Lesser General Public License (LGPL), version 2.1 or later.
|
||||
* See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>.
|
||||
* License: GNU Lesser General Public License (LGPL), version 2.1 or later
|
||||
* See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html
|
||||
*/
|
||||
package org.hibernate.jpa.test;
|
||||
package org.hibernate.testing.orm.jpa;
|
||||
|
||||
import java.net.URL;
|
||||
import java.util.Collections;
|
|
@ -1,10 +1,10 @@
|
|||
/*
|
||||
* Hibernate, Relational Persistence for Idiomatic Java
|
||||
*
|
||||
* License: GNU Lesser General Public License (LGPL), version 2.1 or later.
|
||||
* See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>.
|
||||
* License: GNU Lesser General Public License (LGPL), version 2.1 or later
|
||||
* See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html
|
||||
*/
|
||||
package org.hibernate.jpa.test;
|
||||
package org.hibernate.testing.orm.jpa;
|
||||
|
||||
import java.net.URL;
|
||||
import java.util.Collections;
|
||||
|
@ -22,6 +22,10 @@ import org.hibernate.jpa.HibernatePersistenceProvider;
|
|||
/**
|
||||
* Implementation of {@link PersistenceUnitInfo} for testing use.
|
||||
*
|
||||
* Expected usage is to override methods relevant to their specific tests.
|
||||
*
|
||||
* See {@link PersistenceUnitInfoImpl} for a more bean-like implementation
|
||||
*
|
||||
* @author Steve Ebersole
|
||||
*/
|
||||
public class PersistenceUnitInfoAdapter implements PersistenceUnitInfo {
|
|
@ -21,6 +21,12 @@ import javax.sql.DataSource;
|
|||
import org.hibernate.jpa.HibernatePersistenceProvider;
|
||||
|
||||
/**
|
||||
* Implementation of {@link PersistenceUnitInfo} for testing use.
|
||||
*
|
||||
* This implementation provides a bean-like contract for providing PU information.
|
||||
*
|
||||
* See {@link PersistenceUnitInfoAdapter} for an override-based solution
|
||||
*
|
||||
* @author Steve Ebersole
|
||||
*/
|
||||
public class PersistenceUnitInfoImpl implements PersistenceUnitInfo {
|
||||
|
|
Loading…
Reference in New Issue