Re-enabled additional tests
This commit is contained in:
parent
821d85b9a3
commit
c06788dd88
|
@ -296,5 +296,6 @@ tasks.withType( Test.class ).each { test ->
|
|||
// widen the overall 6.0 filter to include various package-protected tests
|
||||
test.include 'org/hibernate/bytecode/internal/bytebuddy/**'
|
||||
test.include 'org/hibernate/event/service/internal/**'
|
||||
test.include 'org/hibernate/tool/schema/internal/**'
|
||||
}
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
"http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd">
|
||||
|
||||
<hibernate-mapping>
|
||||
<class name="org.hibernate.test.refresh.Customer"
|
||||
<class name="org.hibernate.orm.test.refresh.Customer"
|
||||
entity-name="CustomName"
|
||||
lazy="false">
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
* 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.test.refresh;
|
||||
package org.hibernate.orm.test.refresh;
|
||||
|
||||
/**
|
||||
* @author Andrea Boriero
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
* 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.test.refresh;
|
||||
package org.hibernate.orm.test.refresh;
|
||||
|
||||
import org.hibernate.orm.test.jpa.refresh.TestEntity;
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
* 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.test.refresh;
|
||||
package org.hibernate.orm.test.refresh;
|
||||
|
||||
import org.hibernate.cfg.AvailableSettings;
|
||||
import org.hibernate.orm.test.jpa.refresh.TestEntity;
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
* 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.test.refresh;
|
||||
package org.hibernate.orm.test.refresh;
|
||||
|
||||
import org.hibernate.testing.TestForIssue;
|
||||
import org.hibernate.testing.orm.junit.DomainModel;
|
||||
|
@ -19,7 +19,7 @@ import org.junit.jupiter.api.Test;
|
|||
*/
|
||||
@TestForIssue(jiraKey = "HHH-11217")
|
||||
@DomainModel(
|
||||
xmlMappings = "org/hibernate/test/refresh/Customer.hbm.xml"
|
||||
xmlMappings = "org/hibernate/orm/test/refresh/Customer.hbm.xml"
|
||||
)
|
||||
@SessionFactory
|
||||
public class RefreshUsingEntityNameTest {
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
* 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.test.refresh;
|
||||
package org.hibernate.orm.test.refresh;
|
||||
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.GeneratedValue;
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
* 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.test.schemaupdate;
|
||||
package org.hibernate.orm.test.schemaupdate;
|
||||
|
||||
import java.io.BufferedWriter;
|
||||
import java.io.File;
|
||||
|
@ -26,13 +26,14 @@ import org.hibernate.engine.config.spi.ConfigurationService;
|
|||
import org.hibernate.service.ServiceRegistry;
|
||||
import org.hibernate.tool.schema.spi.SchemaManagementToolCoordinator;
|
||||
|
||||
import org.hibernate.testing.RequiresDialect;
|
||||
import org.hibernate.testing.ServiceRegistryBuilder;
|
||||
import org.hibernate.testing.TestForIssue;
|
||||
import org.hibernate.testing.junit4.BaseUnitTestCase;
|
||||
import org.junit.After;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.hibernate.testing.orm.junit.BaseUnitTest;
|
||||
import org.hibernate.testing.orm.junit.RequiresDialect;
|
||||
|
||||
import org.junit.jupiter.api.AfterEach;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import static org.hamcrest.CoreMatchers.is;
|
||||
import static org.hamcrest.MatcherAssert.assertThat;
|
||||
|
@ -40,7 +41,8 @@ import static org.hamcrest.core.StringContains.containsString;
|
|||
|
||||
@TestForIssue(jiraKey = "HHH-11817")
|
||||
@RequiresDialect(H2Dialect.class)
|
||||
public class SchemaCreationToOutputScriptTest extends BaseUnitTestCase {
|
||||
@BaseUnitTest
|
||||
public class SchemaCreationToOutputScriptTest {
|
||||
|
||||
private final String createTableMyEntity = "create table MyEntity";
|
||||
private final String createTableMySecondEntity = "create table MySecondEntity";
|
||||
|
@ -49,7 +51,7 @@ public class SchemaCreationToOutputScriptTest extends BaseUnitTestCase {
|
|||
private ServiceRegistry serviceRegistry;
|
||||
private MetadataImplementor metadata;
|
||||
|
||||
@Before
|
||||
@BeforeEach
|
||||
public void setUp() throws Exception {
|
||||
output = File.createTempFile( "creation_script", ".sql" );
|
||||
output.deleteOnExit();
|
||||
|
@ -92,7 +94,7 @@ public class SchemaCreationToOutputScriptTest extends BaseUnitTestCase {
|
|||
metadata.validate();
|
||||
}
|
||||
|
||||
@After
|
||||
@AfterEach
|
||||
public void tearDown() {
|
||||
ServiceRegistryBuilder.destroy( serviceRegistry );
|
||||
}
|
|
@ -4,7 +4,7 @@
|
|||
* 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.test.schemaupdate;
|
||||
package org.hibernate.orm.test.schemaupdate;
|
||||
|
||||
import java.io.BufferedWriter;
|
||||
import java.io.File;
|
||||
|
@ -26,13 +26,14 @@ import org.hibernate.engine.config.spi.ConfigurationService;
|
|||
import org.hibernate.service.ServiceRegistry;
|
||||
import org.hibernate.tool.schema.spi.SchemaManagementToolCoordinator;
|
||||
|
||||
import org.hibernate.testing.RequiresDialect;
|
||||
import org.hibernate.testing.ServiceRegistryBuilder;
|
||||
import org.hibernate.testing.TestForIssue;
|
||||
import org.hibernate.testing.junit4.BaseUnitTestCase;
|
||||
import org.junit.After;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.hibernate.testing.orm.junit.BaseUnitTest;
|
||||
import org.hibernate.testing.orm.junit.RequiresDialect;
|
||||
|
||||
import org.junit.jupiter.api.AfterEach;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import static org.hamcrest.CoreMatchers.containsString;
|
||||
import static org.hamcrest.CoreMatchers.is;
|
||||
|
@ -40,7 +41,8 @@ import static org.hamcrest.MatcherAssert.assertThat;
|
|||
|
||||
@TestForIssue(jiraKey = "HHH-11817")
|
||||
@RequiresDialect(H2Dialect.class)
|
||||
public class SchemaDropToOutputScriptTest extends BaseUnitTestCase {
|
||||
@BaseUnitTest
|
||||
public class SchemaDropToOutputScriptTest {
|
||||
|
||||
private File output;
|
||||
private ServiceRegistry serviceRegistry;
|
||||
|
@ -49,7 +51,7 @@ public class SchemaDropToOutputScriptTest extends BaseUnitTestCase {
|
|||
private final String dropMySecondEntityTable = "drop table if exists MySecondEntity";
|
||||
|
||||
|
||||
@Before
|
||||
@BeforeEach
|
||||
public void setUp() throws Exception {
|
||||
output = File.createTempFile( "creation_script", ".sql" );
|
||||
output.deleteOnExit();
|
||||
|
@ -92,7 +94,7 @@ public class SchemaDropToOutputScriptTest extends BaseUnitTestCase {
|
|||
metadata.validate();
|
||||
}
|
||||
|
||||
@After
|
||||
@AfterEach
|
||||
public void tearDown() {
|
||||
ServiceRegistryBuilder.destroy( serviceRegistry );
|
||||
}
|
|
@ -4,7 +4,7 @@
|
|||
* 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.test.schemaupdate;
|
||||
package org.hibernate.orm.test.schemaupdate;
|
||||
|
||||
import java.io.BufferedWriter;
|
||||
import java.io.File;
|
||||
|
@ -27,13 +27,14 @@ import org.hibernate.engine.config.spi.ConfigurationService;
|
|||
import org.hibernate.service.ServiceRegistry;
|
||||
import org.hibernate.tool.schema.spi.SchemaManagementToolCoordinator;
|
||||
|
||||
import org.hibernate.testing.RequiresDialect;
|
||||
import org.hibernate.testing.ServiceRegistryBuilder;
|
||||
import org.hibernate.testing.TestForIssue;
|
||||
import org.hibernate.testing.junit4.BaseUnitTestCase;
|
||||
import org.junit.After;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.hibernate.testing.orm.junit.BaseUnitTest;
|
||||
import org.hibernate.testing.orm.junit.RequiresDialect;
|
||||
|
||||
import org.junit.jupiter.api.AfterEach;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import static org.hamcrest.CoreMatchers.containsString;
|
||||
import static org.hamcrest.CoreMatchers.is;
|
||||
|
@ -41,7 +42,8 @@ import static org.hamcrest.MatcherAssert.assertThat;
|
|||
|
||||
@TestForIssue(jiraKey = "HHH-11817")
|
||||
@RequiresDialect(H2Dialect.class)
|
||||
public class SchemaMigrationToOutputScriptTest extends BaseUnitTestCase {
|
||||
@BaseUnitTest
|
||||
public class SchemaMigrationToOutputScriptTest {
|
||||
|
||||
private final String createTableMySecondEntity = "create table MySecondEntity";
|
||||
|
||||
|
@ -49,7 +51,7 @@ public class SchemaMigrationToOutputScriptTest extends BaseUnitTestCase {
|
|||
private ServiceRegistry serviceRegistry;
|
||||
private MetadataImplementor metadata;
|
||||
|
||||
@Before
|
||||
@BeforeEach
|
||||
public void setUp() throws Exception {
|
||||
output = File.createTempFile( "creation_script", ".sql" );
|
||||
output.deleteOnExit();
|
||||
|
@ -105,7 +107,7 @@ public class SchemaMigrationToOutputScriptTest extends BaseUnitTestCase {
|
|||
metadata.validate();
|
||||
}
|
||||
|
||||
@After
|
||||
@AfterEach
|
||||
public void tearDown() {
|
||||
ServiceRegistryBuilder.destroy( serviceRegistry );
|
||||
serviceRegistry = new StandardServiceRegistryBuilder().applySetting( AvailableSettings.HBM2DDL_AUTO, "drop" )
|
|
@ -4,7 +4,7 @@
|
|||
* 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.test.schemaupdate;
|
||||
package org.hibernate.orm.test.schemaupdate;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
|
@ -29,36 +29,22 @@ import org.hibernate.tool.schema.JdbcMetadaAccessStrategy;
|
|||
import org.hibernate.tool.schema.TargetType;
|
||||
|
||||
import org.hibernate.testing.TestForIssue;
|
||||
import org.junit.After;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.junit.runners.Parameterized;
|
||||
import org.junit.jupiter.api.AfterEach;
|
||||
import org.junit.jupiter.params.ParameterizedTest;
|
||||
import org.junit.jupiter.params.provider.EnumSource;
|
||||
|
||||
import static org.hamcrest.core.Is.is;
|
||||
import static org.junit.Assert.assertThat;
|
||||
|
||||
@TestForIssue(jiraKey = "HHH-13788")
|
||||
@RunWith(Parameterized.class)
|
||||
public class SchemaUpdateWithUseJdbcMetadataDefaultsSettingToFalseAndQuotedNameTest {
|
||||
@Parameterized.Parameters
|
||||
public static String[] parameters() {
|
||||
return new String[] {
|
||||
JdbcMetadaAccessStrategy.GROUPED.toString(),
|
||||
JdbcMetadaAccessStrategy.INDIVIDUALLY.toString()
|
||||
};
|
||||
}
|
||||
|
||||
@Parameterized.Parameter
|
||||
public String jdbcMetadataExtractorStrategy;
|
||||
|
||||
private File updateOutputFile;
|
||||
private File createOutputFile;
|
||||
private StandardServiceRegistry ssr;
|
||||
private MetadataImplementor metadata;
|
||||
|
||||
@Before
|
||||
public void setUp() throws IOException {
|
||||
public void setUp(String jdbcMetadataExtractorStrategy) throws IOException {
|
||||
createOutputFile = File.createTempFile( "create_script", ".sql" );
|
||||
createOutputFile.deleteOnExit();
|
||||
updateOutputFile = File.createTempFile( "update_script", ".sql" );
|
||||
|
@ -79,7 +65,7 @@ public class SchemaUpdateWithUseJdbcMetadataDefaultsSettingToFalseAndQuotedNameT
|
|||
metadata.validate();
|
||||
}
|
||||
|
||||
@After
|
||||
@AfterEach
|
||||
public void tearDown() {
|
||||
new SchemaExport().setHaltOnError( true )
|
||||
.setFormat( false )
|
||||
|
@ -87,9 +73,12 @@ public class SchemaUpdateWithUseJdbcMetadataDefaultsSettingToFalseAndQuotedNameT
|
|||
StandardServiceRegistryBuilder.destroy( ssr );
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testSchemaUpdateDoesNotTryToRecreateExistingTables()
|
||||
@ParameterizedTest
|
||||
@EnumSource(JdbcMetadaAccessStrategy.class)
|
||||
public void testSchemaUpdateDoesNotTryToRecreateExistingTables(JdbcMetadaAccessStrategy strategy)
|
||||
throws Exception {
|
||||
setUp( strategy.toString() );
|
||||
|
||||
createSchema();
|
||||
|
||||
new SchemaUpdate().setHaltOnError( true )
|
|
@ -4,7 +4,7 @@
|
|||
* 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.test.schemaupdate;
|
||||
package org.hibernate.orm.test.schemaupdate;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
|
@ -12,7 +12,6 @@ import java.nio.file.Files;
|
|||
import java.util.EnumSet;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.Id;
|
||||
|
||||
|
@ -28,11 +27,9 @@ import org.hibernate.tool.schema.JdbcMetadaAccessStrategy;
|
|||
import org.hibernate.tool.schema.TargetType;
|
||||
|
||||
import org.hibernate.testing.TestForIssue;
|
||||
import org.junit.After;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.junit.runners.Parameterized;
|
||||
import org.junit.jupiter.api.AfterEach;
|
||||
import org.junit.jupiter.params.ParameterizedTest;
|
||||
import org.junit.jupiter.params.provider.EnumSource;
|
||||
|
||||
import static org.hamcrest.core.Is.is;
|
||||
import static org.junit.Assert.assertThat;
|
||||
|
@ -41,27 +38,14 @@ import static org.junit.Assert.assertThat;
|
|||
* @author Andrea Boriero
|
||||
*/
|
||||
@TestForIssue(jiraKey = "HHH-13788")
|
||||
@RunWith(Parameterized.class)
|
||||
public class SchemaUpdateWithUseJdbcMetadataDefaultsSettingToFalseTest {
|
||||
|
||||
@Parameterized.Parameters
|
||||
public static String[] parameters() {
|
||||
return new String[] {
|
||||
JdbcMetadaAccessStrategy.GROUPED.toString(),
|
||||
JdbcMetadaAccessStrategy.INDIVIDUALLY.toString()
|
||||
};
|
||||
}
|
||||
|
||||
@Parameterized.Parameter
|
||||
public String jdbcMetadataExtractorStrategy;
|
||||
|
||||
private File updateOutputFile;
|
||||
private File createOutputFile;
|
||||
private StandardServiceRegistry ssr;
|
||||
private MetadataImplementor metadata;
|
||||
|
||||
@Before
|
||||
public void setUp() throws IOException {
|
||||
public void setUp(String jdbcMetadataExtractorStrategy) throws IOException {
|
||||
createOutputFile = File.createTempFile( "create_script", ".sql" );
|
||||
createOutputFile.deleteOnExit();
|
||||
updateOutputFile = File.createTempFile( "update_script", ".sql" );
|
||||
|
@ -82,7 +66,7 @@ public class SchemaUpdateWithUseJdbcMetadataDefaultsSettingToFalseTest {
|
|||
metadata.validate();
|
||||
}
|
||||
|
||||
@After
|
||||
@AfterEach
|
||||
public void tearDown() {
|
||||
new SchemaExport().setHaltOnError( true )
|
||||
.setFormat( false )
|
||||
|
@ -90,9 +74,12 @@ public class SchemaUpdateWithUseJdbcMetadataDefaultsSettingToFalseTest {
|
|||
StandardServiceRegistryBuilder.destroy( ssr );
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testSchemaUpdateDoesNotTryToRecreateExistingTables()
|
||||
@ParameterizedTest
|
||||
@EnumSource(JdbcMetadaAccessStrategy.class)
|
||||
public void testSchemaUpdateDoesNotTryToRecreateExistingTables(JdbcMetadaAccessStrategy strategy)
|
||||
throws Exception {
|
||||
setUp( strategy.toString() );
|
||||
|
||||
createSchema();
|
||||
|
||||
new SchemaUpdate().setHaltOnError( true )
|
Loading…
Reference in New Issue