From dd0b6a9da3ff1555f00c6d9c6ea4eb6f172a9450 Mon Sep 17 00:00:00 2001 From: Steve Ebersole Date: Fri, 8 Nov 2019 07:07:56 -0600 Subject: [PATCH] Revert "HHH-13656 Con not build and run test on Eclipse IDE" This reverts commit f6fad942df1c25a798c987f3a6d64671b4a103e5. --- gradle.properties | 1 - gradle/libraries.gradle | 1 - hibernate-core/.gitignore | 3 - hibernate-core/hibernate-core.gradle | 173 +----------------- .../metamodel/internal/MetadataContext.java | 2 +- .../hql/internal/SemanticQueryBuilder.java | 2 +- .../dialect/DB2390DialectTestCase.java | 3 +- .../engine/query/InformixFunctionTest.java | 3 +- ...greSQLSequenceGeneratorWithSerialTest.java | 3 +- ...hStrategyFixWithSequenceGeneratorTest.java | 3 +- ...hStrategyWithoutSequenceGeneratorTest.java | 3 +- .../test/graphs/FetchWithRootGraphTest.java | 3 +- ...tialValueTableGeneratorConfiguredTest.java | 4 +- ...tialValueTableGeneratorConfiguredTest.java | 4 +- .../SchemaToolingAutoActionTests.java | 5 - .../jpa/PersistenceUnitInfoTests.java | 20 +- .../jpa/PersistenceUnitOverridesTests.java | 5 - .../orm/test/loading/LoadingSmokeTests.java | 5 - .../mapping/SingleTableInheritanceTests.java | 5 - .../test/metamodel/mapping/SmokeTests.java | 5 - .../criteria/BasicCriteriaExecutionTests.java | 5 - .../test/query/hql/AliasCollisionTest.java | 5 - .../test/query/hql/AttributePathTests.java | 6 +- .../test/query/hql/CaseExpressionsTest.java | 5 - .../query/hql/DynamicInstantiationTests.java | 5 - .../orm/test/query/hql/FromClauseTests.java | 6 +- .../orm/test/query/hql/LiteralTests.java | 5 - .../orm/test/query/hql/PagingTests.java | 5 - .../orm/test/query/hql/ParameterTests.java | 5 - .../test/query/hql/QueryPlanCachingTest.java | 5 - .../orm/test/query/hql/SelectClauseTests.java | 5 - .../orm/test/query/hql/WhereClauseTests.java | 5 - .../orm/test/sql/ast/SmokeTests.java | 5 - .../orm/test/sql/exec/SmokeTests.java | 5 - .../query/InClauseParameterPaddingTest.java | 3 +- .../MaxInExpressionParameterPaddingTest.java | 3 +- .../AnnotationMappingJoinClassTest.java | 3 +- .../hhh12076/HbmMappingJoinClassTest.java | 3 +- .../QueryPlanCacheStatisticsTest.java | 3 +- .../batch/BatchOptimisticLockingTest.java | 3 +- ...chFetchNotFoundIgnoreDefaultStyleTest.java | 3 +- .../proxy/LoadANonExistingEntityTest.java | 3 +- ...adANonExistingNotFoundBatchEntityTest.java | 11 +- .../SQLServerDialectPaginationTest.java | 3 +- .../IdentityJoinedSubclassBatchingTest.java | 13 +- .../JoinedSubclassBatchingTest.java | 7 +- .../SequenceJoinedSubclassBatchingTest.java | 9 +- .../test/locking/AbstractSkipLockedTest.java | 9 +- .../MultiLoadSubSelectCollectionTest.java | 3 +- hibernate-testing/hibernate-testing.gradle | 33 ---- 50 files changed, 56 insertions(+), 381 deletions(-) delete mode 100644 gradle.properties delete mode 100644 hibernate-core/.gitignore diff --git a/gradle.properties b/gradle.properties deleted file mode 100644 index 55f4e1eb03..0000000000 --- a/gradle.properties +++ /dev/null @@ -1 +0,0 @@ -org.gradle.jvmargs=-Duser.language=en_US -Dfile.encoding=UTF-8 -Dsun.jnu.encoding=UTF-8 -Dsun.stderr.encoding=UTF-8 -Dsun.stdout.encoding=UTF-8 -Duser.country=US \ No newline at end of file diff --git a/gradle/libraries.gradle b/gradle/libraries.gradle index b924a9c48a..d526809639 100644 --- a/gradle/libraries.gradle +++ b/gradle/libraries.gradle @@ -109,7 +109,6 @@ ext { junit5_params : "org.junit.jupiter:junit-jupiter-params:${junit5Version}", junit: "junit:junit:${junitVersion}", junit5_vintage: "org.junit.vintage:junit-vintage-engine:${junitVintageVersion}", - junit_pcomms: "org.junit.platform:junit-platform-commons:1.5.2", log4j: "log4j:log4j:1.2.17", diff --git a/hibernate-core/.gitignore b/hibernate-core/.gitignore deleted file mode 100644 index f0db5661af..0000000000 --- a/hibernate-core/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -/hibernate-core-IdeTests.launch -/hibernate-core-RunnableIdeTest.launch -/.externalToolBuilders/ diff --git a/hibernate-core/hibernate-core.gradle b/hibernate-core/hibernate-core.gradle index 3dda5a1b54..8f83f7413e 100644 --- a/hibernate-core/hibernate-core.gradle +++ b/hibernate-core/hibernate-core.gradle @@ -8,11 +8,7 @@ plugins { * License: GNU Lesser General Public License (LGPL), version 2.1 or later. * See the lgpl.txt file in the root directory or . */ -import org.gradle.plugins.ide.eclipse.model.SourceFolder - -import groovy.xml.MarkupBuilder import org.apache.tools.ant.filters.ReplaceTokens -import org.apache.tools.ant.taskdefs.condition.Os apply from: rootProject.file( 'gradle/published-java-module.gradle' ) apply plugin: Antlr4Plugin @@ -24,9 +20,6 @@ configurations { tests { description = 'Configuration for the produced test jar' } - - eclipseConfig { - } } dependencies { @@ -66,17 +59,9 @@ dependencies { provided( libraries.ant ) provided( libraries.cdi ) - eclipseConfig( compileOnly( libraries.ant ) ) - eclipseConfig( compileOnly( libraries.logging_annotations ) ) - eclipseConfig( runtime( libraries.junit ) ) - eclipseConfig( runtime( libraries.junit5_api ) ) - eclipseConfig( runtime( libraries.junit5_jupiter ) ) - eclipseConfig( runtime( libraries.junit5_params ) ) - eclipseConfig( runtime( libraries.junit_pcomms ) ) - runtime( libraries.junit5_vintage ) runtime( libraries.junit5_jupiter ) - + testCompile( project(':hibernate-testing') ) testCompile( libraries.shrinkwrap_api ) testCompile( libraries.shrinkwrap ) @@ -180,159 +165,6 @@ idea { } } -cleanEclipse { - project.delete '.externalToolBuilders' - project.delete 'hibernate-core-RunnableIdeTest.launch' -} - -tasks.eclipse.dependsOn(cleanEclipse) - -eclipse { - project { - file { - withXml { provider -> - def projectDescriptionNode = provider.asNode() -// projectDescriptionNode.children( ).each { nodeItem -> -// println( 'nodeItem: ' + nodeItem ) -// } - def buildSpecNode = projectDescriptionNode.children().find { child -> child.name( ).equals('buildSpec') } - def buildCommandMkp = new StreamingMarkupBuilder().bind { - buildCommand { - name( 'org.eclipse.ui.externaltools.ExternalToolBuilder' ) - triggers( 'full,incremental,' ) - arguments( ) { - dictionary( ) { - key ( 'LaunchConfigHandle' ) - value ( '/.externalToolBuilders/gradlew_process_test_resources.launch' ) - } - } - } - } - def buildCommandNode = new XmlParser().parseText( buildCommandMkp.toString() ) - buildSpecNode.append( buildCommandNode ) - } - } - } - mkdir '.externalToolBuilders' - file('.externalToolBuilders/gradlew_process_test_resources.launch').withWriter { writer -> - // Create MarkupBuilder with 4 space indent - def xml = new MarkupBuilder(new IndentPrinter(writer, " ", true)) - - xml.doubleQuotes = true - xml.mkp.xmlDeclaration(version: '1.0', encoding: 'utf-8', standalone: 'no') - xml.launchConfiguration( type: 'org.eclipse.ui.externaltools.ProgramBuilderLaunchConfigurationType' ) { - stringAttribute( key: 'org.eclipse.debug.core.ATTR_REFRESH_SCOPE', value: "${project.name}" ) - booleanAttribute( key: 'org.eclipse.debug.ui.ATTR_LAUNCH_IN_BACKGROUND', value: 'false' ) - - if (Os.isFamily(Os.FAMILY_WINDOWS)) { - stringAttribute( key: 'org.eclipse.ui.externaltools.ATTR_LOCATION', value: file('../gradlew.bat').absolutePath ) - } else { - stringAttribute( key: 'org.eclipse.ui.externaltools.ATTR_LOCATION', value: file('../gradlew').absolutePath ) - } - stringAttribute( key: 'org.eclipse.ui.externaltools.ATTR_RUN_BUILD_KINDS', value: 'incremental,auto,' ) - stringAttribute( key: 'org.eclipse.ui.externaltools.ATTR_TOOL_ARGUMENTS', value: 'hibernate-core:processTestResources --no-daemon' ) - booleanAttribute( key: 'org.eclipse.ui.externaltools.ATTR_TRIGGERS_CONFIGURED', value: 'true' ) - stringAttribute( key: 'org.eclipse.ui.externaltools.ATTR_WORKING_DIRECTORY', value: file('../').absolutePath ) - } - xml.mkp.comment("AUTO-GENERATED FILE. DO NOT MODIFY. This is generated by gradle eclipse task") - } - file('hibernate-core-RunnableIdeTest.launch').withWriter { writer -> - // Create MarkupBuilder with 4 space indent - def xml = new MarkupBuilder(new IndentPrinter(writer, " ", true)) - - xml.doubleQuotes = true - xml.mkp.xmlDeclaration(version: '1.0', encoding: 'utf-8', standalone: 'no') - xml.launchConfiguration( type: 'org.eclipse.jdt.junit.launchconfig' ) { - listAttribute( key: 'org.eclipse.debug.core.MAPPED_RESOURCE_PATHS' ) { - listEntry( value: "${project.name}" ) - } - listAttribute( key: 'org.eclipse.debug.core.MAPPED_RESOURCE_TYPES' ) { - listEntry( value: '4' ) - } - stringAttribute( key: 'org.eclipse.jdt.junit.CONTAINER', value: "=${project.name}" ) - stringAttribute( key: 'org.eclipse.jdt.junit.EXCLUDE_TAGS', value: '' ) - booleanAttribute( key: 'org.eclipse.jdt.junit.HAS_EXCLUDE_TAGS', value: 'false' ) - booleanAttribute( key: 'org.eclipse.jdt.junit.HAS_INCLUDE_TAGS', value: 'true' ) - stringAttribute( key: 'org.eclipse.jdt.junit.INCLUDE_TAGS', value: 'RunnableIdeTest' ) - booleanAttribute( key: 'org.eclipse.jdt.junit.KEEPRUNNING_ATTR', value: 'false' ) - stringAttribute( key: 'org.eclipse.jdt.junit.TESTNAME', value: '' ) - stringAttribute( key: 'org.eclipse.jdt.junit.TEST_KIND', value: 'org.eclipse.jdt.junit.loader.junit5' ) - stringAttribute( key: 'org.eclipse.jdt.launching.MAIN_TYPE', value: '' ) - stringAttribute( key: 'org.eclipse.jdt.launching.PROJECT_ATTR', value: 'hibernate-core' ) - stringAttribute( key: 'org.eclipse.jdt.launching.VM_ARGUMENTS', value: '-ea' ) - } - xml.mkp.comment("AUTO-GENERATED FILE. DO NOT MODIFY. This is generated by gradle eclipse task") - } - - - classpath { - plusConfigurations += [ - configurations.eclipseConfig - ] - def frf = it.fileReferenceFactory - - file { - beforeMerged { classpath -> - } - whenMerged { classpath -> - Set exclusionSourceSet = [ - 'src/main/resources', - 'src/test/resources' - ] - List newSourceSet = [] - classpath.entries.each { item -> - if( !exclusionSourceSet.contains( item.path ) ) { - println( 'INCLUDING: ' + item ) - newSourceSet.add( item ) - } else { - println( 'NOT INCLUDING: ' + item ) - } - } - - def aptMain = new SourceFolder('target/generated-src/apt/main', 'bin/main') - def aptTest = new SourceFolder('target/generated-src/apt/test', 'bin/test') - def resourceMain = new SourceFolder('src/main/resources', 'target/resources/main') - def resourceTest = new SourceFolder('src/test/resources', 'target/resources/test') - newSourceSet += [ - aptMain, - aptTest, - resourceMain, - resourceTest - ] -// def resourceMain = new Library( frf.fromFile( file ( 'target/resources/main' ) ) ) -// def resourceTest = new Library( frf.fromFile( file ( 'target/resources/test' ) ) ) - println( 'newSourceSet:' ) - println( newSourceSet ) - classpath.entries = newSourceSet - -// classpath.configure([ -// aptMain, -// aptTest, -// resourceMain, -// resourceTest -// ]) - - // Find the "source" entry and add the exclude for the folder containing our super-source code -// Set exclusionSourceSet = [ -// 'src/main/resources', -// 'src/test/resources' -// ] -// Set newSourceSet = [] -// classpath.entries.each { item -> -// if( !exclusionSourceSet.contains( item.path ) ) { -// println( 'INCLUDING: ' + item ) -// newSourceSet.add( item ) -// } else { -// println( 'NOT INCLUDING: ' + item ) -// } -// } -// println( 'newSourceSet:' ) -// println( newSourceSet ) - } - } - } -} - xjc { outputDir = project.jaxbTargetDir @@ -367,8 +199,7 @@ task copyBundleResources (type: Copy) { from file('src/test/bundles') into ext.bundlesTargetDir filter( ReplaceTokens, tokens: ext.bundleTokens) - //println( 'ext: ' + ext ) - //println( 'ext.bundleTokens:' + ext.bundleTokens ) + doFirst { ext.bundlesTargetDir.mkdirs() } diff --git a/hibernate-core/src/main/java/org/hibernate/metamodel/internal/MetadataContext.java b/hibernate-core/src/main/java/org/hibernate/metamodel/internal/MetadataContext.java index 6b99503d95..6dd55238f0 100755 --- a/hibernate-core/src/main/java/org/hibernate/metamodel/internal/MetadataContext.java +++ b/hibernate-core/src/main/java/org/hibernate/metamodel/internal/MetadataContext.java @@ -373,7 +373,7 @@ public class MetadataContext { else if ( persistentClass.hasIdentifierMapper() ) { @SuppressWarnings("unchecked") final Iterator propertyIterator = persistentClass.getIdentifierMapper().getPropertyIterator(); - final Set> idClassAttributes = (Set>)(Object) buildIdClassAttributes( + final Set> idClassAttributes = (Set>) buildIdClassAttributes( identifiableType, propertyIterator ); diff --git a/hibernate-core/src/main/java/org/hibernate/query/hql/internal/SemanticQueryBuilder.java b/hibernate-core/src/main/java/org/hibernate/query/hql/internal/SemanticQueryBuilder.java index 562c92496d..307b39e600 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/hql/internal/SemanticQueryBuilder.java +++ b/hibernate-core/src/main/java/org/hibernate/query/hql/internal/SemanticQueryBuilder.java @@ -2419,7 +2419,7 @@ public class SemanticQueryBuilder extends HqlParserBaseVisitor implements SqmCre //noinspection unchecked return getFunctionTemplate("trim").makeSqmFunctionExpression( - (List>)(Object)asList( + asList( interpretTrimSpecification( ctx.trimSpecification() ), visitTrimCharacter( ctx.trimCharacter() ), source diff --git a/hibernate-core/src/test/java/org/hibernate/dialect/DB2390DialectTestCase.java b/hibernate-core/src/test/java/org/hibernate/dialect/DB2390DialectTestCase.java index 1cf2de450e..9655670443 100644 --- a/hibernate-core/src/test/java/org/hibernate/dialect/DB2390DialectTestCase.java +++ b/hibernate-core/src/test/java/org/hibernate/dialect/DB2390DialectTestCase.java @@ -22,7 +22,6 @@ import org.junit.Test; import org.hibernate.testing.RequiresDialect; import org.hibernate.testing.TestForIssue; -import org.hibernate.testing.transaction.TransactionUtil; import static org.hibernate.testing.transaction.TransactionUtil.doInJPA; import static org.junit.Assert.assertEquals; @@ -67,7 +66,7 @@ public class DB2390DialectTestCase extends BaseEntityManagerFunctionalTestCase { @Before public void populateSchema() { - doInJPA( this::entityManagerFactory, (TransactionUtil.JPATransactionVoidFunction)entityManager -> { + doInJPA( this::entityManagerFactory, entityManager -> { for ( int i = 0; i < 10; ++i ) { final SimpleEntity simpleEntity = new SimpleEntity( i, "Entity" + i ); entityManager.persist( simpleEntity ); diff --git a/hibernate-core/src/test/java/org/hibernate/engine/query/InformixFunctionTest.java b/hibernate-core/src/test/java/org/hibernate/engine/query/InformixFunctionTest.java index 0de8370641..2f9b68c426 100644 --- a/hibernate-core/src/test/java/org/hibernate/engine/query/InformixFunctionTest.java +++ b/hibernate-core/src/test/java/org/hibernate/engine/query/InformixFunctionTest.java @@ -13,7 +13,6 @@ import org.hibernate.dialect.InformixDialect; import org.hibernate.testing.RequiresDialect; import org.hibernate.testing.TestForIssue; import org.hibernate.testing.junit4.BaseCoreFunctionalTestCase; -import org.hibernate.testing.transaction.TransactionUtil; import org.junit.Test; import static org.hibernate.testing.transaction.TransactionUtil.doInHibernate; @@ -127,7 +126,7 @@ public class InformixFunctionTest extends BaseCoreFunctionalTestCase { @Test @TestForIssue( jiraKey = "HHH-10800" ) public void testCurrentTimestamp() throws Exception { - doInHibernate( this::sessionFactory, (TransactionUtil.HibernateTransactionConsumer)session -> { + doInHibernate( this::sessionFactory, session -> { int tries = 2; while ( tries-- > 0 ) { Timestamp timestamp = (Timestamp) session.createQuery( diff --git a/hibernate-core/src/test/java/org/hibernate/id/hhh12973/PostgreSQLSequenceGeneratorWithSerialTest.java b/hibernate-core/src/test/java/org/hibernate/id/hhh12973/PostgreSQLSequenceGeneratorWithSerialTest.java index 2bfb56f020..a30693bcf9 100644 --- a/hibernate-core/src/test/java/org/hibernate/id/hhh12973/PostgreSQLSequenceGeneratorWithSerialTest.java +++ b/hibernate-core/src/test/java/org/hibernate/id/hhh12973/PostgreSQLSequenceGeneratorWithSerialTest.java @@ -32,7 +32,6 @@ import org.hibernate.testing.RequiresDialect; import org.hibernate.testing.TestForIssue; import org.hibernate.testing.logger.LoggerInspectionRule; import org.hibernate.testing.logger.Triggerable; -import org.hibernate.testing.transaction.TransactionUtil; import org.junit.Rule; import org.junit.Test; @@ -119,7 +118,7 @@ public class PostgreSQLSequenceGeneratorWithSerialTest extends BaseEntityManager final int ITERATIONS = 51; - doInJPA( this::entityManagerFactory, (TransactionUtil.JPATransactionVoidFunction)entityManager -> { + doInJPA( this::entityManagerFactory, entityManager -> { for ( int i = 1; i <= ITERATIONS; i++ ) { ApplicationConfiguration model = new ApplicationConfiguration(); diff --git a/hibernate-core/src/test/java/org/hibernate/id/hhh12973/SequenceMismatchStrategyFixWithSequenceGeneratorTest.java b/hibernate-core/src/test/java/org/hibernate/id/hhh12973/SequenceMismatchStrategyFixWithSequenceGeneratorTest.java index 6547aac287..6d2e86ae88 100644 --- a/hibernate-core/src/test/java/org/hibernate/id/hhh12973/SequenceMismatchStrategyFixWithSequenceGeneratorTest.java +++ b/hibernate-core/src/test/java/org/hibernate/id/hhh12973/SequenceMismatchStrategyFixWithSequenceGeneratorTest.java @@ -37,7 +37,6 @@ import org.hibernate.testing.RequiresDialectFeature; import org.hibernate.testing.TestForIssue; import org.hibernate.testing.logger.LoggerInspectionRule; import org.hibernate.testing.logger.Triggerable; -import org.hibernate.testing.transaction.TransactionUtil; import org.hibernate.test.schemaupdate.SchemaExportWithGlobalQuotingEnabledTest; import org.junit.Rule; import org.junit.Test; @@ -114,7 +113,7 @@ public class SequenceMismatchStrategyFixWithSequenceGeneratorTest extends BaseEn final int ITERATIONS = 51; - doInJPA( this::entityManagerFactory, (TransactionUtil.JPATransactionVoidFunction)entityManager -> { + doInJPA( this::entityManagerFactory, entityManager -> { for ( int i = 1; i <= ITERATIONS; i++ ) { ApplicationConfiguration model = new ApplicationConfiguration(); diff --git a/hibernate-core/src/test/java/org/hibernate/id/hhh12973/SequenceMismatchStrategyWithoutSequenceGeneratorTest.java b/hibernate-core/src/test/java/org/hibernate/id/hhh12973/SequenceMismatchStrategyWithoutSequenceGeneratorTest.java index fd85a83d15..51ef22de42 100644 --- a/hibernate-core/src/test/java/org/hibernate/id/hhh12973/SequenceMismatchStrategyWithoutSequenceGeneratorTest.java +++ b/hibernate-core/src/test/java/org/hibernate/id/hhh12973/SequenceMismatchStrategyWithoutSequenceGeneratorTest.java @@ -31,7 +31,6 @@ import org.hibernate.testing.RequiresDialectFeature; import org.hibernate.testing.TestForIssue; import org.hibernate.testing.logger.LoggerInspectionRule; import org.hibernate.testing.logger.Triggerable; -import org.hibernate.testing.transaction.TransactionUtil; import org.junit.Rule; import org.junit.Test; @@ -106,7 +105,7 @@ public class SequenceMismatchStrategyWithoutSequenceGeneratorTest extends BaseEn final int ITERATIONS = 51; - doInJPA( this::entityManagerFactory, (TransactionUtil.JPATransactionVoidFunction)entityManager -> { + doInJPA( this::entityManagerFactory, entityManager -> { for ( int i = 1; i <= ITERATIONS; i++ ) { ApplicationConfiguration model = new ApplicationConfiguration(); diff --git a/hibernate-core/src/test/java/org/hibernate/jpa/test/graphs/FetchWithRootGraphTest.java b/hibernate-core/src/test/java/org/hibernate/jpa/test/graphs/FetchWithRootGraphTest.java index 7c20922c27..928bc8b714 100644 --- a/hibernate-core/src/test/java/org/hibernate/jpa/test/graphs/FetchWithRootGraphTest.java +++ b/hibernate-core/src/test/java/org/hibernate/jpa/test/graphs/FetchWithRootGraphTest.java @@ -16,7 +16,6 @@ import org.hibernate.Hibernate; import org.hibernate.graph.RootGraph; import org.hibernate.testing.TestForIssue; import org.hibernate.testing.junit4.BaseCoreFunctionalTestCase; -import org.hibernate.testing.transaction.TransactionUtil; import org.junit.After; import org.junit.Before; import org.junit.Test; @@ -33,7 +32,7 @@ public class FetchWithRootGraphTest extends BaseCoreFunctionalTestCase { @Before public void before() { - doInHibernate( this::sessionFactory, (TransactionUtil.HibernateTransactionConsumer)s -> { + doInHibernate( this::sessionFactory, s -> { for ( long i = 0; i < 10; ++i ) { SimpleEntity sim = new SimpleEntity( i, "Entity #" + i ); EntityWithReference ref = new EntityWithReference( i, sim ); diff --git a/hibernate-core/src/test/java/org/hibernate/jpa/test/indetifier/AssignedInitialValueTableGeneratorConfiguredTest.java b/hibernate-core/src/test/java/org/hibernate/jpa/test/indetifier/AssignedInitialValueTableGeneratorConfiguredTest.java index 39ab61abba..0184f90d59 100644 --- a/hibernate-core/src/test/java/org/hibernate/jpa/test/indetifier/AssignedInitialValueTableGeneratorConfiguredTest.java +++ b/hibernate-core/src/test/java/org/hibernate/jpa/test/indetifier/AssignedInitialValueTableGeneratorConfiguredTest.java @@ -19,7 +19,7 @@ import javax.persistence.TableGenerator; import org.hibernate.Session; import org.hibernate.jdbc.Work; import org.hibernate.jpa.test.BaseEntityManagerFunctionalTestCase; -import org.hibernate.testing.transaction.TransactionUtil; + import org.junit.Test; import static org.hamcrest.CoreMatchers.notNullValue; @@ -56,7 +56,7 @@ public class AssignedInitialValueTableGeneratorConfiguredTest extends BaseEntity @Test public void testTheGeneratedIdValuesAreCorrect() { - doInJPA( this::entityManagerFactory, (TransactionUtil.JPATransactionVoidFunction)entityManager -> { + doInJPA( this::entityManagerFactory, entityManager -> { for ( long i = 0; i < 3; i++ ) { Product product = new Product(); product.setName( "Hibernate " + i ); diff --git a/hibernate-core/src/test/java/org/hibernate/jpa/test/indetifier/DefaultInitialValueTableGeneratorConfiguredTest.java b/hibernate-core/src/test/java/org/hibernate/jpa/test/indetifier/DefaultInitialValueTableGeneratorConfiguredTest.java index 99e4e08008..f47f912d79 100644 --- a/hibernate-core/src/test/java/org/hibernate/jpa/test/indetifier/DefaultInitialValueTableGeneratorConfiguredTest.java +++ b/hibernate-core/src/test/java/org/hibernate/jpa/test/indetifier/DefaultInitialValueTableGeneratorConfiguredTest.java @@ -19,7 +19,7 @@ import javax.persistence.TableGenerator; import org.hibernate.Session; import org.hibernate.jdbc.Work; import org.hibernate.jpa.test.BaseEntityManagerFunctionalTestCase; -import org.hibernate.testing.transaction.TransactionUtil; + import org.junit.Test; import static org.hamcrest.CoreMatchers.notNullValue; @@ -57,7 +57,7 @@ public class DefaultInitialValueTableGeneratorConfiguredTest extends BaseEntityM @Test public void testTheGeneratedIdValuesAreCorrect() { - doInJPA( this::entityManagerFactory, (TransactionUtil.JPATransactionVoidFunction)entityManager -> { + doInJPA( this::entityManagerFactory, entityManager -> { for ( long i = 0; i < 3; i++ ) { Product product = new Product(); product.setName( "Hibernate " + i ); diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/bootstrap/SchemaToolingAutoActionTests.java b/hibernate-core/src/test/java/org/hibernate/orm/test/bootstrap/SchemaToolingAutoActionTests.java index fc9a0ac20f..cc581d3346 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/bootstrap/SchemaToolingAutoActionTests.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/bootstrap/SchemaToolingAutoActionTests.java @@ -13,8 +13,6 @@ import org.hibernate.tool.schema.Action; import org.hibernate.tool.schema.spi.SchemaManagementToolCoordinator; import org.junit.Test; -import org.junit.jupiter.api.Tag; -import org.junit.jupiter.api.Tags; import static org.hamcrest.CoreMatchers.is; import static org.hamcrest.MatcherAssert.assertThat; @@ -22,9 +20,6 @@ import static org.hamcrest.MatcherAssert.assertThat; /** * @author Steve Ebersole */ -@Tags({ - @Tag("RunnableIdeTest"), -}) public class SchemaToolingAutoActionTests { @Test public void testLegacySettingAsAction() { diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/bootstrap/jpa/PersistenceUnitInfoTests.java b/hibernate-core/src/test/java/org/hibernate/orm/test/bootstrap/jpa/PersistenceUnitInfoTests.java index eccc6a6ec6..1c0ca45444 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/bootstrap/jpa/PersistenceUnitInfoTests.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/bootstrap/jpa/PersistenceUnitInfoTests.java @@ -6,14 +6,8 @@ */ package org.hibernate.orm.test.bootstrap.jpa; -import static org.hamcrest.CoreMatchers.instanceOf; -import static org.hamcrest.CoreMatchers.is; -import static org.hamcrest.MatcherAssert.assertThat; -import static org.junit.Assert.assertEquals; - import java.util.Collections; import java.util.Map; - import javax.persistence.EntityManagerFactory; import javax.persistence.spi.PersistenceProvider; import javax.sql.DataSource; @@ -23,20 +17,22 @@ import org.hibernate.engine.jdbc.connections.internal.DatasourceConnectionProvid import org.hibernate.engine.jdbc.connections.spi.ConnectionProvider; import org.hibernate.engine.spi.SessionFactoryImplementor; import org.hibernate.jpa.HibernatePersistenceProvider; -import org.hibernate.testing.TestForIssue; import org.hibernate.testing.jdbc.DataSourceStub; + +import org.hibernate.testing.FailureExpected; +import org.hibernate.testing.TestForIssue; import org.hibernate.testing.junit4.BaseUnitTestCase; import org.hibernate.testing.util.jpa.PersistenceUnitInfoAdapter; import org.junit.Test; -import org.junit.jupiter.api.Tag; -import org.junit.jupiter.api.Tags; + +import static org.hamcrest.CoreMatchers.instanceOf; +import static org.hamcrest.CoreMatchers.is; +import static org.hamcrest.MatcherAssert.assertThat; +import static org.junit.Assert.assertEquals; /** * @author Steve Ebersole */ -@Tags({ - @Tag("RunnableIdeTest"), -}) public class PersistenceUnitInfoTests extends BaseUnitTestCase { @Test @TestForIssue( jiraKey = "HHH-13432" ) diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/bootstrap/jpa/PersistenceUnitOverridesTests.java b/hibernate-core/src/test/java/org/hibernate/orm/test/bootstrap/jpa/PersistenceUnitOverridesTests.java index b402beaae0..d9a6bce824 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/bootstrap/jpa/PersistenceUnitOverridesTests.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/bootstrap/jpa/PersistenceUnitOverridesTests.java @@ -35,8 +35,6 @@ import org.hibernate.testing.junit4.BaseUnitTestCase; import org.hibernate.testing.util.jpa.DelegatingPersistenceUnitInfo; import org.hibernate.testing.util.jpa.PersistenceUnitInfoAdapter; import org.junit.Test; -import org.junit.jupiter.api.Tag; -import org.junit.jupiter.api.Tags; import static org.hamcrest.CoreMatchers.containsString; import static org.hamcrest.CoreMatchers.instanceOf; @@ -48,9 +46,6 @@ import static org.hamcrest.MatcherAssert.assertThat; /** * @author Steve Ebersole */ -@Tags({ - @Tag("RunnableIdeTest"), -}) public class PersistenceUnitOverridesTests extends BaseUnitTestCase { @Test diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/loading/LoadingSmokeTests.java b/hibernate-core/src/test/java/org/hibernate/orm/test/loading/LoadingSmokeTests.java index c9eb610147..ee3a9519cb 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/loading/LoadingSmokeTests.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/loading/LoadingSmokeTests.java @@ -20,8 +20,6 @@ import org.hibernate.testing.orm.junit.SessionFactoryFunctionalTesting; import org.hibernate.testing.orm.junit.SessionFactoryScope; import org.junit.jupiter.api.AfterAll; import org.junit.jupiter.api.BeforeAll; -import org.junit.jupiter.api.Tag; -import org.junit.jupiter.api.Tags; import org.junit.jupiter.api.Test; import static org.hamcrest.CoreMatchers.instanceOf; @@ -38,9 +36,6 @@ import static org.hamcrest.MatcherAssert.assertThat; @SessionFactory @SessionFactoryFunctionalTesting @SuppressWarnings("WeakerAccess") -@Tags({ - @Tag("RunnableIdeTest"), -}) public class LoadingSmokeTests { @Test public void testBasicLoad(SessionFactoryScope scope) { diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/metamodel/mapping/SingleTableInheritanceTests.java b/hibernate-core/src/test/java/org/hibernate/orm/test/metamodel/mapping/SingleTableInheritanceTests.java index b807b00982..b85e4acc22 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/metamodel/mapping/SingleTableInheritanceTests.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/metamodel/mapping/SingleTableInheritanceTests.java @@ -23,8 +23,6 @@ import org.hibernate.testing.orm.junit.SessionFactory; import org.hibernate.testing.orm.junit.SessionFactoryScope; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Tag; -import org.junit.jupiter.api.Tags; import org.junit.jupiter.api.Test; import static org.hamcrest.CoreMatchers.instanceOf; @@ -45,9 +43,6 @@ import static org.hamcrest.MatcherAssert.assertThat; ) @ServiceRegistry @SessionFactory -@Tags({ - @Tag("RunnableIdeTest"), -}) public class SingleTableInheritanceTests { @Test public void basicTest(SessionFactoryScope scope) { diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/metamodel/mapping/SmokeTests.java b/hibernate-core/src/test/java/org/hibernate/orm/test/metamodel/mapping/SmokeTests.java index 2497a3b5ea..3e84731d56 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/metamodel/mapping/SmokeTests.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/metamodel/mapping/SmokeTests.java @@ -35,8 +35,6 @@ import org.hibernate.testing.orm.junit.FailureExpected; import org.hibernate.testing.orm.junit.ServiceRegistry; import org.hibernate.testing.orm.junit.SessionFactory; import org.hibernate.testing.orm.junit.SessionFactoryScope; -import org.junit.jupiter.api.Tag; -import org.junit.jupiter.api.Tags; import org.junit.jupiter.api.Test; import static org.hamcrest.CoreMatchers.instanceOf; @@ -53,9 +51,6 @@ import static org.hamcrest.MatcherAssert.assertThat; ) @ServiceRegistry @SessionFactory -@Tags({ - @Tag("RunnableIdeTest"), -}) public class SmokeTests { @Test diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/query/criteria/BasicCriteriaExecutionTests.java b/hibernate-core/src/test/java/org/hibernate/orm/test/query/criteria/BasicCriteriaExecutionTests.java index 0b34c8c2e0..76df143e15 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/query/criteria/BasicCriteriaExecutionTests.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/query/criteria/BasicCriteriaExecutionTests.java @@ -27,15 +27,10 @@ import org.hibernate.sql.exec.spi.JdbcParameter; import org.hibernate.testing.junit4.BaseNonConfigCoreFunctionalTestCase; import org.junit.Test; -import org.junit.jupiter.api.Tag; -import org.junit.jupiter.api.Tags; /** * @author Steve Ebersole */ -@Tags({ - @Tag("RunnableIdeTest"), -}) public class BasicCriteriaExecutionTests extends BaseNonConfigCoreFunctionalTestCase { @Override diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/query/hql/AliasCollisionTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/query/hql/AliasCollisionTest.java index c93e772fcc..b9a906e500 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/query/hql/AliasCollisionTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/query/hql/AliasCollisionTest.java @@ -21,8 +21,6 @@ import org.hibernate.query.sqm.tree.select.SqmSelection; import org.hibernate.testing.orm.domain.gambit.EntityWithManyToOneSelfReference; import org.hibernate.testing.orm.domain.gambit.SimpleEntity; import org.hibernate.testing.orm.junit.ExpectedException; -import org.junit.jupiter.api.Tag; -import org.junit.jupiter.api.Tags; import org.junit.jupiter.api.Test; import static org.hamcrest.CoreMatchers.instanceOf; @@ -39,9 +37,6 @@ import static org.hibernate.testing.hamcrest.CollectionMatchers.isEmpty; * @author Andrea Boriero */ @SuppressWarnings("WeakerAccess") -@Tags({ - @Tag("RunnableIdeTest"), -}) public class AliasCollisionTest extends BaseSqmUnitTest { @Override diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/query/hql/AttributePathTests.java b/hibernate-core/src/test/java/org/hibernate/orm/test/query/hql/AttributePathTests.java index 73f70d2d35..62264f10a4 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/query/hql/AttributePathTests.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/query/hql/AttributePathTests.java @@ -20,8 +20,7 @@ import org.hibernate.query.sqm.tree.predicate.SqmComparisonPredicate; import org.hibernate.query.sqm.tree.select.SqmSelectStatement; import org.hibernate.query.sqm.tree.select.SqmSelectableNode; import org.hibernate.query.sqm.tree.select.SqmSelection; -import org.junit.jupiter.api.Tag; -import org.junit.jupiter.api.Tags; + import org.junit.jupiter.api.Test; import static org.hamcrest.CoreMatchers.instanceOf; @@ -33,9 +32,6 @@ import static org.hamcrest.MatcherAssert.assertThat; * @author Steve Ebersole */ @SuppressWarnings("WeakerAccess") -@Tags({ - @Tag("RunnableIdeTest"), -}) public class AttributePathTests extends BaseSqmUnitTest { @Override diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/query/hql/CaseExpressionsTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/query/hql/CaseExpressionsTest.java index 332bbc12f8..349e4689dd 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/query/hql/CaseExpressionsTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/query/hql/CaseExpressionsTest.java @@ -19,8 +19,6 @@ import org.hibernate.query.sqm.tree.select.SqmSelectableNode; import org.hibernate.testing.orm.junit.FailureExpected; import org.hibernate.testing.orm.junit.TestingUtil; -import org.junit.jupiter.api.Tag; -import org.junit.jupiter.api.Tags; import org.junit.jupiter.api.Test; import static org.hamcrest.CoreMatchers.instanceOf; @@ -34,9 +32,6 @@ import static org.junit.Assert.assertEquals; * @author Steve Ebersole */ @SuppressWarnings("WeakerAccess") -@Tags({ - @Tag("RunnableIdeTest"), -}) public class CaseExpressionsTest extends BaseSqmUnitTest { @Override diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/query/hql/DynamicInstantiationTests.java b/hibernate-core/src/test/java/org/hibernate/orm/test/query/hql/DynamicInstantiationTests.java index 151bdbbaef..4c292e09fa 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/query/hql/DynamicInstantiationTests.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/query/hql/DynamicInstantiationTests.java @@ -20,8 +20,6 @@ import org.hibernate.query.sqm.tree.select.SqmSelectStatement; import org.hibernate.testing.orm.domain.gambit.EntityOfBasics; import org.hibernate.testing.orm.junit.TestingUtil; -import org.junit.jupiter.api.Tag; -import org.junit.jupiter.api.Tags; import org.junit.jupiter.api.Test; import static org.hamcrest.CoreMatchers.equalTo; @@ -36,9 +34,6 @@ import static org.junit.jupiter.api.Assertions.assertEquals; * @author Steve Ebersole */ @SuppressWarnings("WeakerAccess") -@Tags({ - @Tag("RunnableIdeTest"), -}) public class DynamicInstantiationTests extends BaseSqmUnitTest { @Override diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/query/hql/FromClauseTests.java b/hibernate-core/src/test/java/org/hibernate/orm/test/query/hql/FromClauseTests.java index e8a49b8bec..5c9605ff3b 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/query/hql/FromClauseTests.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/query/hql/FromClauseTests.java @@ -17,8 +17,7 @@ import org.hibernate.query.sqm.tree.from.SqmRoot; import org.hibernate.query.sqm.tree.select.SqmSelectStatement; import org.hibernate.query.sqm.tree.select.SqmSelection; import org.hibernate.query.sqm.tree.select.SqmSortSpecification; -import org.junit.jupiter.api.Tag; -import org.junit.jupiter.api.Tags; + import org.junit.jupiter.api.Test; import static org.hamcrest.CoreMatchers.containsString; @@ -39,9 +38,6 @@ import static org.junit.jupiter.api.Assertions.fail; * @author Steve Ebersole */ @SuppressWarnings("WeakerAccess") -@Tags({ - @Tag("RunnableIdeTest"), -}) public class FromClauseTests extends BaseSqmUnitTest { @Override diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/query/hql/LiteralTests.java b/hibernate-core/src/test/java/org/hibernate/orm/test/query/hql/LiteralTests.java index ae725c2b59..02e231f751 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/query/hql/LiteralTests.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/query/hql/LiteralTests.java @@ -11,16 +11,11 @@ import org.hibernate.orm.test.query.sqm.BaseSqmUnitTest; import org.hibernate.query.sqm.tree.select.SqmSelectStatement; import org.hibernate.testing.orm.domain.StandardDomainModel; -import org.junit.jupiter.api.Tag; -import org.junit.jupiter.api.Tags; import org.junit.jupiter.api.Test; /** * @author Steve Ebersole */ -@Tags({ - @Tag("RunnableIdeTest"), -}) public class LiteralTests extends BaseSqmUnitTest { @Override diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/query/hql/PagingTests.java b/hibernate-core/src/test/java/org/hibernate/orm/test/query/hql/PagingTests.java index c43d040cf8..cfa5edacdb 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/query/hql/PagingTests.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/query/hql/PagingTests.java @@ -13,8 +13,6 @@ import org.hibernate.testing.orm.junit.DomainModel; import org.hibernate.testing.orm.junit.ServiceRegistry; import org.hibernate.testing.orm.junit.SessionFactory; import org.hibernate.testing.orm.junit.SessionFactoryScope; -import org.junit.jupiter.api.Tag; -import org.junit.jupiter.api.Tags; import org.junit.jupiter.api.Test; import static org.hibernate.orm.test.query.sqm.BaseSqmUnitTest.interpretSelect; @@ -33,9 +31,6 @@ import static org.hibernate.orm.test.query.sqm.BaseSqmUnitTest.interpretSelect; ) ) @SessionFactory -@Tags({ - @Tag("RunnableIdeTest"), -}) public class PagingTests { @Test diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/query/hql/ParameterTests.java b/hibernate-core/src/test/java/org/hibernate/orm/test/query/hql/ParameterTests.java index 8ad77a7a39..867598735f 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/query/hql/ParameterTests.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/query/hql/ParameterTests.java @@ -29,8 +29,6 @@ import org.hibernate.sql.exec.spi.ExecutionContext; import org.hibernate.testing.orm.junit.ExpectedException; import org.hibernate.testing.orm.junit.ExpectedExceptionExtension; -import org.junit.jupiter.api.Tag; -import org.junit.jupiter.api.Tags; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; @@ -46,9 +44,6 @@ import static org.hibernate.testing.hamcrest.CollectionMatchers.hasSize; */ @SuppressWarnings("WeakerAccess") @ExtendWith( ExpectedExceptionExtension.class ) -@Tags({ - @Tag("RunnableIdeTest"), -}) public class ParameterTests extends BaseSqmUnitTest { @Test @ExpectedException( SemanticException.class ) diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/query/hql/QueryPlanCachingTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/query/hql/QueryPlanCachingTest.java index 4c61b00073..1d72bdbdd1 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/query/hql/QueryPlanCachingTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/query/hql/QueryPlanCachingTest.java @@ -12,8 +12,6 @@ import org.hibernate.testing.orm.junit.DomainModel; import org.hibernate.testing.orm.junit.ServiceRegistry; import org.hibernate.testing.orm.junit.SessionFactory; import org.hibernate.testing.orm.junit.SessionFactoryScope; -import org.junit.jupiter.api.Tag; -import org.junit.jupiter.api.Tags; import org.junit.jupiter.api.Test; /** @@ -23,9 +21,6 @@ import org.junit.jupiter.api.Test; @DomainModel( annotatedClasses = SmokeTests.SimpleEntity.class ) @ServiceRegistry @SessionFactory( exportSchema = true ) -@Tags({ - @Tag("RunnableIdeTest"), -}) public class QueryPlanCachingTest { @Test public void testHqlTranslationCaching(SessionFactoryScope scope) { diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/query/hql/SelectClauseTests.java b/hibernate-core/src/test/java/org/hibernate/orm/test/query/hql/SelectClauseTests.java index f576c1a75a..d0e90f297a 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/query/hql/SelectClauseTests.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/query/hql/SelectClauseTests.java @@ -33,8 +33,6 @@ import org.hibernate.testing.orm.domain.gambit.EntityOfLists; import org.hibernate.testing.orm.domain.gambit.EntityOfMaps; import org.hibernate.testing.orm.domain.gambit.EntityOfSets; import org.hibernate.testing.orm.junit.TestingUtil; -import org.junit.jupiter.api.Tag; -import org.junit.jupiter.api.Tags; import org.junit.jupiter.api.Test; import static org.hamcrest.CoreMatchers.endsWith; @@ -51,9 +49,6 @@ import static org.junit.jupiter.api.Assertions.assertEquals; * @author Steve Ebersole */ @SuppressWarnings("WeakerAccess") -@Tags({ - @Tag("RunnableIdeTest"), -}) public class SelectClauseTests extends BaseSqmUnitTest { @Test diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/query/hql/WhereClauseTests.java b/hibernate-core/src/test/java/org/hibernate/orm/test/query/hql/WhereClauseTests.java index ffe30a7dce..f8e1851544 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/query/hql/WhereClauseTests.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/query/hql/WhereClauseTests.java @@ -20,8 +20,6 @@ import org.hibernate.query.sqm.tree.select.SqmSelectStatement; import org.hibernate.testing.orm.domain.gambit.EntityOfLists; import org.hibernate.testing.orm.domain.gambit.EntityOfMaps; import org.hibernate.testing.orm.domain.gambit.EntityOfSets; -import org.junit.jupiter.api.Tag; -import org.junit.jupiter.api.Tags; import org.junit.jupiter.api.Test; import static org.hamcrest.CoreMatchers.instanceOf; @@ -35,9 +33,6 @@ import static org.hamcrest.MatcherAssert.assertThat; * @author Gunnar Morling */ @SuppressWarnings("WeakerAccess") -@Tags({ - @Tag("RunnableIdeTest"), -}) public class WhereClauseTests extends BaseSqmUnitTest { @Override diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/sql/ast/SmokeTests.java b/hibernate-core/src/test/java/org/hibernate/orm/test/sql/ast/SmokeTests.java index 64be219284..f6b4cb6079 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/sql/ast/SmokeTests.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/sql/ast/SmokeTests.java @@ -41,8 +41,6 @@ import org.hibernate.testing.orm.junit.DomainModel; import org.hibernate.testing.orm.junit.ServiceRegistry; import org.hibernate.testing.orm.junit.SessionFactory; import org.hibernate.testing.orm.junit.SessionFactoryScope; -import org.junit.jupiter.api.Tag; -import org.junit.jupiter.api.Tags; import org.junit.jupiter.api.Test; import static org.hamcrest.CoreMatchers.equalTo; @@ -66,9 +64,6 @@ import static org.hamcrest.MatcherAssert.assertThat; ) ) @SessionFactory -@Tags({ - @Tag("RunnableIdeTest"), -}) public class SmokeTests { @Test public void testSimpleHqlInterpretation(SessionFactoryScope scope) { diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/sql/exec/SmokeTests.java b/hibernate-core/src/test/java/org/hibernate/orm/test/sql/exec/SmokeTests.java index d90357de32..ac538d3e64 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/sql/exec/SmokeTests.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/sql/exec/SmokeTests.java @@ -31,8 +31,6 @@ import org.hibernate.testing.orm.junit.SessionFactory; import org.hibernate.testing.orm.junit.SessionFactoryScope; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Tag; -import org.junit.jupiter.api.Tags; import org.junit.jupiter.api.Test; import static org.hamcrest.CoreMatchers.instanceOf; @@ -63,9 +61,6 @@ import static org.hibernate.orm.test.metamodel.mapping.SmokeTests.Gender.MALE; } ) @SessionFactory( exportSchema = true ) -@Tags({ - @Tag("RunnableIdeTest"), -}) public class SmokeTests { @BeforeEach diff --git a/hibernate-core/src/test/java/org/hibernate/query/InClauseParameterPaddingTest.java b/hibernate-core/src/test/java/org/hibernate/query/InClauseParameterPaddingTest.java index 3882ea4bbe..77860ab63f 100644 --- a/hibernate-core/src/test/java/org/hibernate/query/InClauseParameterPaddingTest.java +++ b/hibernate-core/src/test/java/org/hibernate/query/InClauseParameterPaddingTest.java @@ -16,7 +16,6 @@ import org.hibernate.jpa.test.BaseEntityManagerFunctionalTestCase; import org.hibernate.testing.TestForIssue; import org.hibernate.testing.jdbc.SQLStatementInterceptor; -import org.hibernate.testing.transaction.TransactionUtil; import org.hibernate.test.util.jdbc.PreparedStatementSpyConnectionProvider; import org.junit.Test; @@ -47,7 +46,7 @@ public class InClauseParameterPaddingTest extends BaseEntityManagerFunctionalTes @Override protected void afterEntityManagerFactoryBuilt() { - doInJPA( this::entityManagerFactory, (TransactionUtil.JPATransactionVoidFunction)entityManager -> { + doInJPA( this::entityManagerFactory, entityManager -> { for ( int i = 1; i < 10; i++ ) { Person person = new Person(); person.setId( i ); diff --git a/hibernate-core/src/test/java/org/hibernate/query/MaxInExpressionParameterPaddingTest.java b/hibernate-core/src/test/java/org/hibernate/query/MaxInExpressionParameterPaddingTest.java index 03144edd90..92fddb1315 100644 --- a/hibernate-core/src/test/java/org/hibernate/query/MaxInExpressionParameterPaddingTest.java +++ b/hibernate-core/src/test/java/org/hibernate/query/MaxInExpressionParameterPaddingTest.java @@ -20,7 +20,6 @@ import org.hibernate.jpa.test.BaseEntityManagerFunctionalTestCase; import org.hibernate.testing.RequiresDialect; import org.hibernate.testing.TestForIssue; import org.hibernate.testing.jdbc.SQLStatementInterceptor; -import org.hibernate.testing.transaction.TransactionUtil; import org.hibernate.test.util.jdbc.PreparedStatementSpyConnectionProvider; import org.junit.Test; @@ -59,7 +58,7 @@ public class MaxInExpressionParameterPaddingTest extends BaseEntityManagerFuncti @Override protected void afterEntityManagerFactoryBuilt() { - doInJPA( this::entityManagerFactory, (TransactionUtil.JPATransactionVoidFunction)entityManager -> { + doInJPA( this::entityManagerFactory, entityManager -> { for ( int i = 0; i < MAX_COUNT; i++ ) { Person person = new Person(); person.setId( i ); diff --git a/hibernate-core/src/test/java/org/hibernate/query/hhh12076/AnnotationMappingJoinClassTest.java b/hibernate-core/src/test/java/org/hibernate/query/hhh12076/AnnotationMappingJoinClassTest.java index f652a31bfa..90d082d046 100644 --- a/hibernate-core/src/test/java/org/hibernate/query/hhh12076/AnnotationMappingJoinClassTest.java +++ b/hibernate-core/src/test/java/org/hibernate/query/hhh12076/AnnotationMappingJoinClassTest.java @@ -37,7 +37,6 @@ import org.hibernate.annotations.UpdateTimestamp; import org.hibernate.testing.TestForIssue; import org.hibernate.testing.junit4.BaseCoreFunctionalTestCase; -import org.hibernate.testing.transaction.TransactionUtil; import org.junit.Test; import static org.hibernate.testing.transaction.TransactionUtil.doInHibernate; @@ -63,7 +62,7 @@ public class AnnotationMappingJoinClassTest extends BaseCoreFunctionalTestCase { @Override protected void prepareTest() { - doInHibernate( this::sessionFactory, (TransactionUtil.HibernateTransactionConsumer)session -> { + doInHibernate( this::sessionFactory, session -> { TaskStatus taskStatus = new TaskStatus(); taskStatus.setName("Enabled"); taskStatus.setDisplayName("Enabled"); diff --git a/hibernate-core/src/test/java/org/hibernate/query/hhh12076/HbmMappingJoinClassTest.java b/hibernate-core/src/test/java/org/hibernate/query/hhh12076/HbmMappingJoinClassTest.java index 855244fa13..be9fb29624 100644 --- a/hibernate-core/src/test/java/org/hibernate/query/hhh12076/HbmMappingJoinClassTest.java +++ b/hibernate-core/src/test/java/org/hibernate/query/hhh12076/HbmMappingJoinClassTest.java @@ -15,7 +15,6 @@ import org.hibernate.query.Query; import org.hibernate.testing.FailureExpected; import org.hibernate.testing.TestForIssue; import org.hibernate.testing.junit4.BaseCoreFunctionalTestCase; -import org.hibernate.testing.transaction.TransactionUtil; import org.junit.Test; import static org.hibernate.testing.transaction.TransactionUtil.doInHibernate; @@ -47,7 +46,7 @@ public class HbmMappingJoinClassTest extends BaseCoreFunctionalTestCase { @Override protected void prepareTest() { - doInHibernate( this::sessionFactory, (TransactionUtil.HibernateTransactionConsumer)session -> { + doInHibernate( this::sessionFactory, session -> { TaskStatus taskStatus = new TaskStatus(); taskStatus.setName("Enabled"); taskStatus.setDisplayName("Enabled"); diff --git a/hibernate-core/src/test/java/org/hibernate/stat/internal/QueryPlanCacheStatisticsTest.java b/hibernate-core/src/test/java/org/hibernate/stat/internal/QueryPlanCacheStatisticsTest.java index 7d5c9027fb..a0a02b1705 100644 --- a/hibernate-core/src/test/java/org/hibernate/stat/internal/QueryPlanCacheStatisticsTest.java +++ b/hibernate-core/src/test/java/org/hibernate/stat/internal/QueryPlanCacheStatisticsTest.java @@ -18,7 +18,6 @@ import org.hibernate.stat.QueryStatistics; import org.hibernate.stat.Statistics; import org.hibernate.testing.TestForIssue; -import org.hibernate.testing.transaction.TransactionUtil; import org.junit.Test; import static org.hibernate.testing.transaction.TransactionUtil.doInJPA; @@ -49,7 +48,7 @@ public class QueryPlanCacheStatisticsTest extends BaseEntityManagerFunctionalTes SessionFactory sessionFactory = entityManagerFactory().unwrap( SessionFactory.class ); statistics = sessionFactory.getStatistics(); - doInJPA( this::entityManagerFactory, (TransactionUtil.JPATransactionVoidFunction)entityManager -> { + doInJPA( this::entityManagerFactory, entityManager -> { for ( long i = 1; i <= 5; i++ ) { if ( i % 3 == 0 ) { entityManager.flush(); diff --git a/hibernate-core/src/test/java/org/hibernate/test/batch/BatchOptimisticLockingTest.java b/hibernate-core/src/test/java/org/hibernate/test/batch/BatchOptimisticLockingTest.java index 34a6771187..c554de19df 100644 --- a/hibernate-core/src/test/java/org/hibernate/test/batch/BatchOptimisticLockingTest.java +++ b/hibernate-core/src/test/java/org/hibernate/test/batch/BatchOptimisticLockingTest.java @@ -20,7 +20,6 @@ import javax.persistence.Version; import org.hibernate.cfg.AvailableSettings; import org.hibernate.testing.junit4.BaseNonConfigCoreFunctionalTestCase; -import org.hibernate.testing.transaction.TransactionUtil; import org.junit.Test; import static org.hibernate.testing.transaction.TransactionUtil.doInHibernate; @@ -68,7 +67,7 @@ public class BatchOptimisticLockingTest extends } ); try { - doInHibernate( this::sessionFactory, (TransactionUtil.HibernateTransactionConsumer)session -> { + doInHibernate( this::sessionFactory, session -> { List persons = session.createQuery( "select p from Person p").getResultList(); for ( int i = 0; i < persons.size(); i++ ) { diff --git a/hibernate-core/src/test/java/org/hibernate/test/batchfetch/BatchFetchNotFoundIgnoreDefaultStyleTest.java b/hibernate-core/src/test/java/org/hibernate/test/batchfetch/BatchFetchNotFoundIgnoreDefaultStyleTest.java index 1465875ec0..f992d5c407 100644 --- a/hibernate-core/src/test/java/org/hibernate/test/batchfetch/BatchFetchNotFoundIgnoreDefaultStyleTest.java +++ b/hibernate-core/src/test/java/org/hibernate/test/batchfetch/BatchFetchNotFoundIgnoreDefaultStyleTest.java @@ -28,7 +28,6 @@ import org.hibernate.persister.entity.EntityPersister; import org.hibernate.resource.jdbc.spi.StatementInspector; import org.hibernate.testing.junit4.BaseCoreFunctionalTestCase; -import org.hibernate.testing.transaction.TransactionUtil; import org.junit.After; import org.junit.Before; import org.junit.Test; @@ -158,7 +157,7 @@ public class BatchFetchNotFoundIgnoreDefaultStyleTest extends BaseCoreFunctional public void testMostNotFoundFromQuery() { doInHibernate( - this::sessionFactory, (TransactionUtil.HibernateTransactionConsumer)session -> { + this::sessionFactory, session -> { // delete all but last Task entity for ( int i = 0; i < 7; i++ ) { session.delete( tasks.get( i ) ); diff --git a/hibernate-core/src/test/java/org/hibernate/test/bytecode/enhancement/lazy/proxy/LoadANonExistingEntityTest.java b/hibernate-core/src/test/java/org/hibernate/test/bytecode/enhancement/lazy/proxy/LoadANonExistingEntityTest.java index e70c042d65..639827c46b 100644 --- a/hibernate-core/src/test/java/org/hibernate/test/bytecode/enhancement/lazy/proxy/LoadANonExistingEntityTest.java +++ b/hibernate-core/src/test/java/org/hibernate/test/bytecode/enhancement/lazy/proxy/LoadANonExistingEntityTest.java @@ -32,7 +32,6 @@ import org.hibernate.testing.TestForIssue; import org.hibernate.testing.bytecode.enhancement.BytecodeEnhancerRunner; import org.hibernate.testing.bytecode.enhancement.EnhancementOptions; import org.hibernate.testing.junit4.BaseNonConfigCoreFunctionalTestCase; -import org.hibernate.testing.transaction.TransactionUtil; import org.junit.After; import org.junit.Before; import org.junit.Test; @@ -132,7 +131,7 @@ public class LoadANonExistingEntityTest extends BaseNonConfigCoreFunctionalTestC @Before public void setUpData() { doInHibernate( - this::sessionFactory, (TransactionUtil.HibernateTransactionConsumer)session -> { + this::sessionFactory, session -> { for ( int i = 0; i < NUMBER_OF_ENTITIES; i++ ) { final Employee employee = new Employee(); employee.id = i + 1; diff --git a/hibernate-core/src/test/java/org/hibernate/test/bytecode/enhancement/lazy/proxy/LoadANonExistingNotFoundBatchEntityTest.java b/hibernate-core/src/test/java/org/hibernate/test/bytecode/enhancement/lazy/proxy/LoadANonExistingNotFoundBatchEntityTest.java index 631f7261c5..94b155aa5d 100644 --- a/hibernate-core/src/test/java/org/hibernate/test/bytecode/enhancement/lazy/proxy/LoadANonExistingNotFoundBatchEntityTest.java +++ b/hibernate-core/src/test/java/org/hibernate/test/bytecode/enhancement/lazy/proxy/LoadANonExistingNotFoundBatchEntityTest.java @@ -39,7 +39,6 @@ import org.hibernate.testing.TestForIssue; import org.hibernate.testing.bytecode.enhancement.BytecodeEnhancerRunner; import org.hibernate.testing.bytecode.enhancement.EnhancementOptions; import org.hibernate.testing.junit4.BaseNonConfigCoreFunctionalTestCase; -import org.hibernate.testing.transaction.TransactionUtil; import org.junit.After; import org.junit.Before; import org.junit.Test; @@ -68,7 +67,7 @@ public class LoadANonExistingNotFoundBatchEntityTest extends BaseNonConfigCoreFu statistics.clear(); doInHibernate( - this::sessionFactory, (TransactionUtil.HibernateTransactionConsumer)session -> { + this::sessionFactory, session -> { List employees = new ArrayList<>( NUMBER_OF_ENTITIES ); for ( int i = 0 ; i < NUMBER_OF_ENTITIES ; i++ ) { employees.add( session.load( Employee.class, i + 1 ) ); @@ -94,7 +93,7 @@ public class LoadANonExistingNotFoundBatchEntityTest extends BaseNonConfigCoreFu statistics.clear(); doInHibernate( - this::sessionFactory, (TransactionUtil.HibernateTransactionConsumer)session -> { + this::sessionFactory, session -> { for ( int i = 0 ; i < NUMBER_OF_ENTITIES ; i++ ) { Employee employee = session.get( Employee.class, i + 1 ); assertNull( employee.employer ); @@ -116,7 +115,7 @@ public class LoadANonExistingNotFoundBatchEntityTest extends BaseNonConfigCoreFu statistics.clear(); doInHibernate( - this::sessionFactory, (TransactionUtil.HibernateTransactionConsumer)session -> { + this::sessionFactory, session -> { for ( int i = 0; i < NUMBER_OF_ENTITIES; i++ ) { Employee employee = session.get( Employee.class, i + 1 ); Employer employer = new Employer(); @@ -128,7 +127,7 @@ public class LoadANonExistingNotFoundBatchEntityTest extends BaseNonConfigCoreFu ); doInHibernate( - this::sessionFactory, (TransactionUtil.HibernateTransactionConsumer)session -> { + this::sessionFactory, session -> { for ( int i = 0; i < NUMBER_OF_ENTITIES; i++ ) { Employee employee = session.get( Employee.class, i + 1 ); assertTrue( Hibernate.isInitialized( employee.employer ) ); @@ -150,7 +149,7 @@ public class LoadANonExistingNotFoundBatchEntityTest extends BaseNonConfigCoreFu @Before public void setUpData() { doInHibernate( - this::sessionFactory, (TransactionUtil.HibernateTransactionConsumer)session -> { + this::sessionFactory, session -> { for ( int i = 0; i < NUMBER_OF_ENTITIES; i++ ) { final Employee employee = new Employee(); employee.id = i + 1; diff --git a/hibernate-core/src/test/java/org/hibernate/test/dialect/functional/SQLServerDialectPaginationTest.java b/hibernate-core/src/test/java/org/hibernate/test/dialect/functional/SQLServerDialectPaginationTest.java index 6209a5e146..d4c9904942 100644 --- a/hibernate-core/src/test/java/org/hibernate/test/dialect/functional/SQLServerDialectPaginationTest.java +++ b/hibernate-core/src/test/java/org/hibernate/test/dialect/functional/SQLServerDialectPaginationTest.java @@ -21,7 +21,6 @@ import org.junit.Test; import org.hibernate.testing.RequiresDialect; import org.hibernate.testing.TestForIssue; -import org.hibernate.testing.transaction.TransactionUtil; import static org.hibernate.testing.transaction.TransactionUtil.doInJPA; import static org.junit.Assert.assertEquals; @@ -55,7 +54,7 @@ public class SQLServerDialectPaginationTest extends BaseEntityManagerFunctionalT @Test public void testPaginationQuery() { // prepare some test data - doInJPA( this::entityManagerFactory, (TransactionUtil.JPATransactionVoidFunction)entityManager -> { + doInJPA( this::entityManagerFactory, entityManager -> { for ( int i = 1; i <= 20; ++i ) { final SimpleEntity entity = new SimpleEntity( i, "Entity" + i ); entityManager.persist( entity ); diff --git a/hibernate-core/src/test/java/org/hibernate/test/joinedsubclassbatch/IdentityJoinedSubclassBatchingTest.java b/hibernate-core/src/test/java/org/hibernate/test/joinedsubclassbatch/IdentityJoinedSubclassBatchingTest.java index a8b13e7e45..5efb442de2 100644 --- a/hibernate-core/src/test/java/org/hibernate/test/joinedsubclassbatch/IdentityJoinedSubclassBatchingTest.java +++ b/hibernate-core/src/test/java/org/hibernate/test/joinedsubclassbatch/IdentityJoinedSubclassBatchingTest.java @@ -29,7 +29,6 @@ import org.hibernate.testing.DialectChecks; import org.hibernate.testing.RequiresDialectFeature; import org.hibernate.testing.TestForIssue; import org.hibernate.testing.junit4.BaseCoreFunctionalTestCase; -import org.hibernate.testing.transaction.TransactionUtil; import org.junit.Assert; import org.junit.Test; @@ -93,7 +92,7 @@ public class IdentityJoinedSubclassBatchingTest extends BaseCoreFunctionalTestCa public void doBatchInsertUpdateJoined(int nEntities, int nBeforeFlush) { - doInHibernate( this::sessionFactory, (TransactionUtil.HibernateTransactionConsumer)s -> { + doInHibernate( this::sessionFactory, s -> { for ( int i = 0; i < nEntities; i++ ) { Employee e = new Employee(); e.getId(); @@ -111,7 +110,7 @@ public class IdentityJoinedSubclassBatchingTest extends BaseCoreFunctionalTestCa } } ); - doInHibernate( this::sessionFactory, (TransactionUtil.HibernateTransactionConsumer)s -> { + doInHibernate( this::sessionFactory, s -> { int i = 0; ScrollableResults sr = s.createQuery( "select e from Employee e" ) @@ -123,7 +122,7 @@ public class IdentityJoinedSubclassBatchingTest extends BaseCoreFunctionalTestCa } } ); - doInHibernate( this::sessionFactory, (TransactionUtil.HibernateTransactionConsumer)s -> { + doInHibernate( this::sessionFactory, s -> { int i = 0; ScrollableResults sr = s.createQuery( "select e from Employee e" ) @@ -140,7 +139,7 @@ public class IdentityJoinedSubclassBatchingTest extends BaseCoreFunctionalTestCa public void testAssertSubclassInsertedSuccessfullyAfterCommit() { final int nEntities = 10; - doInHibernate( this::sessionFactory, (TransactionUtil.HibernateTransactionConsumer)s -> { + doInHibernate( this::sessionFactory, s -> { for ( int i = 0; i < nEntities; i++ ) { Employee e = new Employee(); e.setName( "Mark" ); @@ -158,7 +157,7 @@ public class IdentityJoinedSubclassBatchingTest extends BaseCoreFunctionalTestCa Assert.assertEquals( nEntities, numberOfInsertedEmployee ); } ); - doInHibernate( this::sessionFactory, (TransactionUtil.HibernateTransactionConsumer)s -> { + doInHibernate( this::sessionFactory, s -> { int i = 0; ScrollableResults sr = s.createQuery( "select e from Employee e" ) @@ -191,7 +190,7 @@ public class IdentityJoinedSubclassBatchingTest extends BaseCoreFunctionalTestCa } ); - doInHibernate( this::sessionFactory, (TransactionUtil.HibernateTransactionConsumer)s -> { + doInHibernate( this::sessionFactory, s -> { int i = 0; ScrollableResults sr = s.createQuery( "select e from Employee e" ) diff --git a/hibernate-core/src/test/java/org/hibernate/test/joinedsubclassbatch/JoinedSubclassBatchingTest.java b/hibernate-core/src/test/java/org/hibernate/test/joinedsubclassbatch/JoinedSubclassBatchingTest.java index 59825bdece..1cce829ae5 100644 --- a/hibernate-core/src/test/java/org/hibernate/test/joinedsubclassbatch/JoinedSubclassBatchingTest.java +++ b/hibernate-core/src/test/java/org/hibernate/test/joinedsubclassbatch/JoinedSubclassBatchingTest.java @@ -27,7 +27,6 @@ import org.hibernate.cfg.Environment; import org.hibernate.testing.TestForIssue; import org.hibernate.testing.junit4.BaseCoreFunctionalTestCase; -import org.hibernate.testing.transaction.TransactionUtil; import org.junit.Test; import static org.hibernate.testing.transaction.TransactionUtil.doInHibernate; @@ -89,7 +88,7 @@ public class JoinedSubclassBatchingTest extends BaseCoreFunctionalTestCase { public void doBatchInsertUpdateJoined(int nEntities, int nBeforeFlush) { - doInHibernate( this::sessionFactory, (TransactionUtil.HibernateTransactionConsumer)s -> { + doInHibernate( this::sessionFactory, s -> { for ( int i = 0; i < nEntities; i++ ) { Employee e = new Employee(); e.getId(); @@ -107,7 +106,7 @@ public class JoinedSubclassBatchingTest extends BaseCoreFunctionalTestCase { } } ); - doInHibernate( this::sessionFactory, (TransactionUtil.HibernateTransactionConsumer)s -> { + doInHibernate( this::sessionFactory, s -> { int i = 0; ScrollableResults sr = s.createQuery( "select e from Employee e" ) @@ -119,7 +118,7 @@ public class JoinedSubclassBatchingTest extends BaseCoreFunctionalTestCase { } } ); - doInHibernate( this::sessionFactory, (TransactionUtil.HibernateTransactionConsumer)s -> { + doInHibernate( this::sessionFactory, s -> { int i = 0; ScrollableResults sr = s.createQuery( "select e from Employee e" ) diff --git a/hibernate-core/src/test/java/org/hibernate/test/joinedsubclassbatch/SequenceJoinedSubclassBatchingTest.java b/hibernate-core/src/test/java/org/hibernate/test/joinedsubclassbatch/SequenceJoinedSubclassBatchingTest.java index e3e1e946c0..a310cb3639 100644 --- a/hibernate-core/src/test/java/org/hibernate/test/joinedsubclassbatch/SequenceJoinedSubclassBatchingTest.java +++ b/hibernate-core/src/test/java/org/hibernate/test/joinedsubclassbatch/SequenceJoinedSubclassBatchingTest.java @@ -29,7 +29,6 @@ import org.hibernate.testing.DialectChecks; import org.hibernate.testing.RequiresDialectFeature; import org.hibernate.testing.TestForIssue; import org.hibernate.testing.junit4.BaseCoreFunctionalTestCase; -import org.hibernate.testing.transaction.TransactionUtil; import org.junit.Assert; import org.junit.Test; @@ -93,7 +92,7 @@ public class SequenceJoinedSubclassBatchingTest extends BaseCoreFunctionalTestCa public void doBatchInsertUpdateJoined(int nEntities, int nBeforeFlush) { - doInHibernate( this::sessionFactory, (TransactionUtil.HibernateTransactionConsumer)s -> { + doInHibernate( this::sessionFactory, s -> { for ( int i = 0; i < nEntities; i++ ) { Employee e = new Employee(); e.getId(); @@ -111,7 +110,7 @@ public class SequenceJoinedSubclassBatchingTest extends BaseCoreFunctionalTestCa } } ); - doInHibernate( this::sessionFactory, (TransactionUtil.HibernateTransactionConsumer)s -> { + doInHibernate( this::sessionFactory, s -> { int i = 0; ScrollableResults sr = s.createQuery( "select e from Employee e" ) @@ -123,7 +122,7 @@ public class SequenceJoinedSubclassBatchingTest extends BaseCoreFunctionalTestCa } } ); - doInHibernate( this::sessionFactory, (TransactionUtil.HibernateTransactionConsumer)s -> { + doInHibernate( this::sessionFactory, s -> { int i = 0; ScrollableResults sr = s.createQuery( "select e from Employee e" ) @@ -155,7 +154,7 @@ public class SequenceJoinedSubclassBatchingTest extends BaseCoreFunctionalTestCa } ); - doInHibernate( this::sessionFactory, (TransactionUtil.HibernateTransactionConsumer)s -> { + doInHibernate( this::sessionFactory, s -> { int i = 0; ScrollableResults sr = s.createQuery( "select e from Employee e" ) diff --git a/hibernate-core/src/test/java/org/hibernate/test/locking/AbstractSkipLockedTest.java b/hibernate-core/src/test/java/org/hibernate/test/locking/AbstractSkipLockedTest.java index d758a89315..f22dfe972c 100644 --- a/hibernate-core/src/test/java/org/hibernate/test/locking/AbstractSkipLockedTest.java +++ b/hibernate-core/src/test/java/org/hibernate/test/locking/AbstractSkipLockedTest.java @@ -18,7 +18,6 @@ import org.hibernate.query.Query; import org.hibernate.testing.RequiresDialect; import org.hibernate.testing.junit4.BaseNonConfigCoreFunctionalTestCase; -import org.hibernate.testing.transaction.TransactionUtil; import org.junit.Test; import static org.hibernate.testing.transaction.TransactionUtil.doInHibernate; @@ -41,7 +40,7 @@ public abstract class AbstractSkipLockedTest @RequiresDialect({ SQLServer2005Dialect.class }) public void testSQLServerSkipLocked() { - doInHibernate( this::sessionFactory, (TransactionUtil.HibernateTransactionConsumer)session -> { + doInHibernate( this::sessionFactory, session -> { for ( long i = 1; i <= 10; i++ ) { BatchJob batchJob = new BatchJob(); batchJob.setId( i ); @@ -74,7 +73,7 @@ public abstract class AbstractSkipLockedTest @RequiresDialect({ PostgreSQL95Dialect.class }) public void testPostgreSQLSkipLocked() { - doInHibernate( this::sessionFactory, (TransactionUtil.HibernateTransactionConsumer)session -> { + doInHibernate( this::sessionFactory, session -> { for ( long i = 1; i <= 10; i++ ) { BatchJob batchJob = new BatchJob(); batchJob.setId( i ); @@ -113,7 +112,7 @@ public abstract class AbstractSkipLockedTest @RequiresDialect({ Oracle8iDialect.class }) public void testOracleSkipLocked() { - doInHibernate( this::sessionFactory, (TransactionUtil.HibernateTransactionConsumer)session -> { + doInHibernate( this::sessionFactory, session -> { for ( long i = 1; i <= 10; i++ ) { BatchJob batchJob = new BatchJob(); batchJob.setId( i ); @@ -148,7 +147,7 @@ public abstract class AbstractSkipLockedTest @RequiresDialect({ MySQL8Dialect.class }) public void testMySQLSkipLocked() { - doInHibernate( this::sessionFactory, (TransactionUtil.HibernateTransactionConsumer)session -> { + doInHibernate( this::sessionFactory, session -> { for ( long i = 1; i <= 10; i++ ) { BatchJob batchJob = new BatchJob(); batchJob.setId( i ); diff --git a/hibernate-core/src/test/java/org/hibernate/test/ops/multiLoad/MultiLoadSubSelectCollectionTest.java b/hibernate-core/src/test/java/org/hibernate/test/ops/multiLoad/MultiLoadSubSelectCollectionTest.java index 1b0a1e6e77..31bf5a1547 100644 --- a/hibernate-core/src/test/java/org/hibernate/test/ops/multiLoad/MultiLoadSubSelectCollectionTest.java +++ b/hibernate-core/src/test/java/org/hibernate/test/ops/multiLoad/MultiLoadSubSelectCollectionTest.java @@ -29,7 +29,6 @@ import org.hibernate.stat.Statistics; import org.hibernate.testing.TestForIssue; import org.hibernate.testing.junit4.BaseNonConfigCoreFunctionalTestCase; -import org.hibernate.testing.transaction.TransactionUtil; import org.junit.After; import org.junit.Before; import org.junit.Test; @@ -86,7 +85,7 @@ public class MultiLoadSubSelectCollectionTest extends BaseNonConfigCoreFunctiona @TestForIssue( jiraKey = "HHH-12740" ) public void testSubselect() { doInHibernate( - this::sessionFactory, (TransactionUtil.HibernateTransactionConsumer)session -> { + this::sessionFactory, session -> { List list = session.byMultipleIds( Parent.class ).multiLoad( ids(56) ); diff --git a/hibernate-testing/hibernate-testing.gradle b/hibernate-testing/hibernate-testing.gradle index 151a558b5b..82b5d62095 100644 --- a/hibernate-testing/hibernate-testing.gradle +++ b/hibernate-testing/hibernate-testing.gradle @@ -5,8 +5,6 @@ * See the lgpl.txt file in the root directory or . */ -import org.gradle.plugins.ide.eclipse.model.ProjectDependency - apply from: rootProject.file( 'gradle/published-java-module.gradle' ) description = 'Support for testing Hibernate ORM functionality' @@ -45,37 +43,6 @@ sourceSets.test.resources { setSrcDirs( ['src/test/java'] ) } -tasks.eclipse.dependsOn(cleanEclipse) -eclipse { - classpath { - file { - whenMerged { classpath -> - Set exclusionSourceSet = [ - //May be a saide efect of 'gradlew_process_test_resources' on hibernate-core.gradle. It will be?! - '/org.eclipse.ui.externaltools.ExternalToolBuilder' - ] - List newSourceSet = [] - classpath.entries.each { item -> - if( !exclusionSourceSet.contains( item.path ) ) { - //println( 'INCLUDING: ' + item ) - newSourceSet.add( item ) - } else { - //println( 'NOT INCLUDING: ' + item ) - } - } - println( 'newSourceSet:' ) - println( newSourceSet ) - - def hibernateCore = new ProjectDependency('/hibernate-core') - newSourceSet += [ - hibernateCore - ] - classpath.entries = newSourceSet - } - } - } -} - // todo : Fold into hibernate-core and publish in separate publications // once http://issues.gradle.org/browse/GRADLE-2966 is resolved; // that will allow us to keep the same artifactId and publish the pom