HHH-7187 - Moving AbstractEntityTest
This commit is contained in:
parent
c7aa99d0d3
commit
c41fee2a07
|
@ -29,7 +29,7 @@ public abstract class AbstractOneSessionTest extends AbstractEnversTest {
|
||||||
protected Configuration config;
|
protected Configuration config;
|
||||||
private ServiceRegistry serviceRegistry;
|
private ServiceRegistry serviceRegistry;
|
||||||
private SessionFactory sessionFactory;
|
private SessionFactory sessionFactory;
|
||||||
private Session session ;
|
private Session session;
|
||||||
private AuditReader auditReader;
|
private AuditReader auditReader;
|
||||||
|
|
||||||
@BeforeClassOnce
|
@BeforeClassOnce
|
||||||
|
@ -60,7 +60,6 @@ public abstract class AbstractOneSessionTest extends AbstractEnversTest {
|
||||||
return "hibernate.test.session-cfg.xml";
|
return "hibernate.test.session-cfg.xml";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private SessionFactory getSessionFactory(){
|
private SessionFactory getSessionFactory(){
|
||||||
return sessionFactory;
|
return sessionFactory;
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,11 +26,11 @@ package org.hibernate.envers.test.integration.query;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import javax.persistence.EntityManager;
|
import javax.persistence.EntityManager;
|
||||||
|
|
||||||
|
import org.hibernate.envers.test.BaseEnversJPAFunctionalTestCase;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
import org.hibernate.ejb.Ejb3Configuration;
|
import org.hibernate.ejb.Ejb3Configuration;
|
||||||
import org.hibernate.envers.query.AuditEntity;
|
import org.hibernate.envers.query.AuditEntity;
|
||||||
import org.hibernate.envers.test.AbstractEntityTest;
|
|
||||||
import org.hibernate.envers.test.Priority;
|
import org.hibernate.envers.test.Priority;
|
||||||
import org.hibernate.envers.test.entities.StrIntTestEntity;
|
import org.hibernate.envers.test.entities.StrIntTestEntity;
|
||||||
import org.hibernate.envers.test.entities.reventity.CustomRevEntity;
|
import org.hibernate.envers.test.entities.reventity.CustomRevEntity;
|
||||||
|
@ -39,7 +39,7 @@ import org.hibernate.envers.test.entities.reventity.CustomRevEntity;
|
||||||
* @author Adam Warski (adam at warski dot org)
|
* @author Adam Warski (adam at warski dot org)
|
||||||
*/
|
*/
|
||||||
@SuppressWarnings({"unchecked"})
|
@SuppressWarnings({"unchecked"})
|
||||||
public class CustomRevEntityQuery extends AbstractEntityTest {
|
public class CustomRevEntityQuery extends BaseEnversJPAFunctionalTestCase {
|
||||||
private Integer id1;
|
private Integer id1;
|
||||||
private Integer id2;
|
private Integer id2;
|
||||||
private Long timestamp;
|
private Long timestamp;
|
||||||
|
|
|
@ -21,12 +21,13 @@
|
||||||
* 51 Franklin Street, Fifth Floor
|
* 51 Franklin Street, Fifth Floor
|
||||||
* Boston, MA 02110-1301 USA
|
* Boston, MA 02110-1301 USA
|
||||||
*/
|
*/
|
||||||
package org.hibernate.envers.test;
|
package org.hibernate.envers.test.performance;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.Properties;
|
import java.util.Properties;
|
||||||
import javax.persistence.EntityManager;
|
import javax.persistence.EntityManager;
|
||||||
|
|
||||||
|
import org.hibernate.envers.test.AbstractEnversTest;
|
||||||
import org.junit.Before;
|
import org.junit.Before;
|
||||||
|
|
||||||
import org.hibernate.cfg.Environment;
|
import org.hibernate.cfg.Environment;
|
||||||
|
@ -46,7 +47,7 @@ import org.hibernate.testing.BeforeClassOnce;
|
||||||
* @author Adam Warski (adam at warski dot org)
|
* @author Adam Warski (adam at warski dot org)
|
||||||
* @author Lukasz Antoniak (lukasz dot antoniak at gmail dot com)
|
* @author Lukasz Antoniak (lukasz dot antoniak at gmail dot com)
|
||||||
*/
|
*/
|
||||||
public abstract class AbstractEntityTest extends AbstractEnversTest {
|
public abstract class AbstractEntityManagerTest extends AbstractEnversTest {
|
||||||
public static final Dialect DIALECT = Dialect.getDialect();
|
public static final Dialect DIALECT = Dialect.getDialect();
|
||||||
|
|
||||||
private EntityManagerFactoryImpl emf;
|
private EntityManagerFactoryImpl emf;
|
|
@ -26,12 +26,10 @@ import java.io.IOException;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import org.hibernate.envers.test.AbstractEntityTest;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Adam Warski (adam at warski dot org)
|
* @author Adam Warski (adam at warski dot org)
|
||||||
*/
|
*/
|
||||||
public abstract class AbstractPerformanceTest extends AbstractEntityTest {
|
public abstract class AbstractPerformanceTest extends AbstractEntityManagerTest {
|
||||||
protected String getSecondsString(long milliseconds) {
|
protected String getSecondsString(long milliseconds) {
|
||||||
return (milliseconds/1000) + "." + (milliseconds%1000);
|
return (milliseconds/1000) + "." + (milliseconds%1000);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue