Re-enable additional tests
This commit is contained in:
parent
0e1822e5dd
commit
1f541170c7
|
@ -13,9 +13,9 @@
|
||||||
|
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<hibernate-mapping package="org.hibernate.test.rowid">
|
<hibernate-mapping package="org.hibernate.orm.test.rowid">
|
||||||
|
|
||||||
<typedef name="rowid" class="org.hibernate.test.rowid.RowIdType"/>
|
<typedef name="rowid" class="org.hibernate.orm.test.rowid.RowIdType"/>
|
||||||
|
|
||||||
<class name="Point" rowid="rowid">
|
<class name="Point" rowid="rowid">
|
||||||
<composite-id>
|
<composite-id>
|
|
@ -6,7 +6,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
//$Id: Point.java 6477 2005-04-21 07:39:21Z oneovthafew $
|
//$Id: Point.java 6477 2005-04-21 07:39:21Z oneovthafew $
|
||||||
package org.hibernate.test.rowid;
|
package org.hibernate.orm.test.rowid;
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
|
|
|
@ -4,60 +4,62 @@
|
||||||
* License: GNU Lesser General Public License (LGPL), version 2.1 or later.
|
* 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>.
|
* See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>.
|
||||||
*/
|
*/
|
||||||
package org.hibernate.test.rowid;
|
package org.hibernate.orm.test.rowid;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.sql.Statement;
|
import java.sql.Statement;
|
||||||
|
|
||||||
|
import org.hibernate.Transaction;
|
||||||
|
import org.hibernate.dialect.OracleDialect;
|
||||||
|
|
||||||
|
import org.hibernate.testing.orm.junit.DomainModel;
|
||||||
|
import org.hibernate.testing.orm.junit.RequiresDialect;
|
||||||
|
import org.hibernate.testing.orm.junit.SessionFactory;
|
||||||
|
import org.hibernate.testing.orm.junit.SessionFactoryScope;
|
||||||
|
import org.junit.jupiter.api.BeforeAll;
|
||||||
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
||||||
import jakarta.persistence.criteria.CriteriaBuilder;
|
import jakarta.persistence.criteria.CriteriaBuilder;
|
||||||
import jakarta.persistence.criteria.CriteriaQuery;
|
import jakarta.persistence.criteria.CriteriaQuery;
|
||||||
|
|
||||||
import org.hibernate.Session;
|
|
||||||
import org.hibernate.Transaction;
|
|
||||||
import org.hibernate.dialect.Oracle9iDialect;
|
|
||||||
import org.hibernate.engine.spi.SessionImplementor;
|
|
||||||
|
|
||||||
import org.hibernate.testing.RequiresDialect;
|
|
||||||
import org.hibernate.testing.junit4.BaseCoreFunctionalTestCase;
|
|
||||||
import org.junit.Test;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Gavin King
|
* @author Gavin King
|
||||||
*/
|
*/
|
||||||
@RequiresDialect( value = Oracle9iDialect.class )
|
@RequiresDialect(value = OracleDialect.class, version = 900)
|
||||||
public class RowIdTest extends BaseCoreFunctionalTestCase {
|
@DomainModel(
|
||||||
public String[] getMappings() {
|
xmlMappings = "org/hibernate/orm/test/rowid/Point.hbm.xml"
|
||||||
return new String[] { "rowid/Point.hbm.xml" };
|
)
|
||||||
}
|
@SessionFactory(
|
||||||
|
exportSchema = false
|
||||||
|
|
||||||
public String getCacheConcurrencyStrategy() {
|
)
|
||||||
return null;
|
public class RowIdTest2 {
|
||||||
}
|
|
||||||
|
|
||||||
public boolean createSchema() {
|
@BeforeAll
|
||||||
return false;
|
public void setUp(SessionFactoryScope scope) {
|
||||||
}
|
scope.inSession(
|
||||||
|
session -> session.doWork(
|
||||||
public void afterSessionFactoryBuilt() {
|
connection -> {
|
||||||
super.afterSessionFactoryBuilt();
|
Statement st = session.getJdbcCoordinator().getStatementPreparer().createStatement();
|
||||||
final Session session = sessionFactory().openSession();
|
try {
|
||||||
session.doWork(
|
session.getJdbcCoordinator().getResultSetReturn().execute( st, "drop table Point" );
|
||||||
connection -> {
|
}
|
||||||
Statement st = ((SessionImplementor)session).getJdbcCoordinator().getStatementPreparer().createStatement();
|
catch (Exception ignored) {
|
||||||
try {
|
}
|
||||||
((SessionImplementor)session).getJdbcCoordinator().getResultSetReturn().execute( st, "drop table Point");
|
session.getJdbcCoordinator().getResultSetReturn().execute(
|
||||||
}
|
st,
|
||||||
catch (Exception ignored) {
|
"create table Point (\"x\" number(19,2) not null, \"y\" number(19,2) not null, description varchar2(255) )"
|
||||||
}
|
);
|
||||||
((SessionImplementor)session).getJdbcCoordinator().getResultSetReturn().execute( st, "create table Point (\"x\" number(19,2) not null, \"y\" number(19,2) not null, description varchar2(255) )");
|
session.getJdbcCoordinator().getResourceRegistry().release( st );
|
||||||
((SessionImplementor)session).getJdbcCoordinator().getResourceRegistry().release( st );
|
}
|
||||||
}
|
)
|
||||||
);
|
);
|
||||||
session.close();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testRowId() {
|
public void testRowId(SessionFactoryScope scope) {
|
||||||
inSession(
|
scope.inSession(
|
||||||
s -> {
|
s -> {
|
||||||
try {
|
try {
|
||||||
Transaction t = s.beginTransaction();
|
Transaction t = s.beginTransaction();
|
|
@ -6,7 +6,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
//$Id: RowIdType.java 6477 2005-04-21 07:39:21Z oneovthafew $
|
//$Id: RowIdType.java 6477 2005-04-21 07:39:21Z oneovthafew $
|
||||||
package org.hibernate.test.rowid;
|
package org.hibernate.orm.test.rowid;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.sql.PreparedStatement;
|
import java.sql.PreparedStatement;
|
Loading…
Reference in New Issue