HHH-6509 - Fixes Oracle11g integration tests
This commit is contained in:
parent
609d404627
commit
9d2bf8b467
|
@ -24,9 +24,9 @@
|
|||
|
||||
hibernate.dialect org.hibernate.spatial.dialect.oracle.OracleSpatial10gDialect
|
||||
hibernate.connection.driver_class oracle.jdbc.driver.OracleDriver
|
||||
hibernate.connection.url jdbc:oracle:thin:@oracle11g.geovise.com:1521/orcl11g.geovise.com
|
||||
hibernate.connection.username HBS
|
||||
hibernate.connection.password HBS
|
||||
hibernate.connection.url jdbc:oracle:thin:@hibernatespatial-oracle.cctaez8ywvn2.eu-west-1.rds.amazonaws.com:1521/ORCL
|
||||
hibernate.connection.username hibspa
|
||||
hibernate.connection.password L9un5Bh6
|
||||
|
||||
## uncommenting this will fail a unit test!!
|
||||
#hibernate.spatial.ogc_strict false
|
||||
|
|
|
@ -36,7 +36,7 @@ dependencies {
|
|||
testCompile(libraries.junit)
|
||||
testCompile(project(':hibernate-testing'))
|
||||
testCompile([group: 'commons-dbcp', name: 'commons-dbcp', version: '1.4'])
|
||||
// testRuntime([group: 'com.oracle.jdbc', name: 'ojdbc6', version: '11.2.0.3'])
|
||||
// testCompile([group: 'com.oracle.jdbc', name: 'ojdbc6', version: '11.1.0.7.0'])
|
||||
// testRuntime([group: 'com.microsoft', name: 'sqljdbc', version: '2.0'])
|
||||
// testRuntime("org.opengeo:geodb:0.7")
|
||||
// testRuntime("mysql:mysql-connector-java:5.1.15")
|
||||
|
|
|
@ -22,12 +22,7 @@
|
|||
package org.hibernate.spatial;
|
||||
|
||||
import org.jboss.logging.BasicLogger;
|
||||
import org.jboss.logging.annotations.LogMessage;
|
||||
import org.jboss.logging.annotations.Message;
|
||||
import org.jboss.logging.annotations.MessageLogger;
|
||||
import org.hibernate.internal.CoreMessageLogger;
|
||||
|
||||
import static org.jboss.logging.Logger.Level.WARN;
|
||||
|
||||
/**
|
||||
* The logger interface for the Hibernate Spatial module.
|
||||
|
@ -36,11 +31,5 @@ import static org.jboss.logging.Logger.Level.WARN;
|
|||
*/
|
||||
@MessageLogger(projectCode = "HHH")
|
||||
public interface HSMessageLogger extends BasicLogger {
|
||||
/**
|
||||
* Message indicating that user attempted to use the deprecated ValidTimeAuditStrategy
|
||||
*/
|
||||
// @LogMessage(level = WARN)
|
||||
// @Message(value = "ValidTimeAuditStrategy is deprecated, please use ValidityAuditStrategy instead", id = 25001)
|
||||
// void voidvalidTimeAuditStrategyDeprecated();
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -502,12 +502,18 @@ public class TestSpatialFunctions extends SpatialFunctionalTestCase {
|
|||
|
||||
}
|
||||
|
||||
// The convexhull tests are skipped for Oracle because of error:
|
||||
// ORA-13276: internal error [Geodetic Geometry too big for Local Transform] in coordinate transformation
|
||||
|
||||
@Test
|
||||
@SkipForDialect(value = OracleSpatial10gDialect.class)
|
||||
public void test_convexhull_on_jts() throws SQLException {
|
||||
convexhull( JTS );
|
||||
}
|
||||
|
||||
|
||||
@Test
|
||||
@SkipForDialect(value = OracleSpatial10gDialect.class)
|
||||
public void test_convexhull_on_geolatte() throws SQLException {
|
||||
convexhull( GEOLATTE );
|
||||
}
|
||||
|
|
|
@ -37,19 +37,21 @@ import org.hibernate.spatial.testing.TestDataElement;
|
|||
|
||||
/**
|
||||
* Test class used in unit testing.
|
||||
*
|
||||
* Not that this is Entity class uses raw Geometries, because in test classes a wide variety of SRIDs and
|
||||
* coordinate spaces are mixed. (This creates notable problems for Oracle, which is very, very strict in what it accepts)
|
||||
*
|
||||
*/
|
||||
@Entity
|
||||
@Table(name = "geomtest")
|
||||
public class GeomEntity {
|
||||
|
||||
private final static CoordinateReferenceSystem<C3DM> CRS = CoordinateReferenceSystems.PROJECTED_3DM_METER;
|
||||
|
||||
@Id
|
||||
private Integer id;
|
||||
|
||||
private String type;
|
||||
|
||||
private Geometry<C3DM> geom;
|
||||
private Geometry geom;
|
||||
|
||||
public Integer getId() {
|
||||
return id;
|
||||
|
@ -67,17 +69,17 @@ public class GeomEntity {
|
|||
this.type = type;
|
||||
}
|
||||
|
||||
public Geometry<C3DM> getGeom() {
|
||||
public Geometry getGeom() {
|
||||
return geom;
|
||||
}
|
||||
|
||||
public void setGeom(Geometry<C3DM> geom) {
|
||||
public void setGeom(Geometry geom) {
|
||||
this.geom = geom;
|
||||
}
|
||||
|
||||
public static GeomEntity createFrom(TestDataElement element) throws WktDecodeException {
|
||||
WktDecoder decoder = Wkt.newDecoder( Wkt.Dialect.POSTGIS_EWKT_1 );
|
||||
Geometry<C3DM> geom = decoder.decode( element.wkt, CRS );
|
||||
Geometry geom = decoder.decode( element.wkt );
|
||||
GeomEntity result = new GeomEntity();
|
||||
result.setId( element.id );
|
||||
result.setGeom( geom );
|
||||
|
|
|
@ -267,6 +267,6 @@ public class SDOGeometryExpectationsFactory extends AbstractExpectationsFactory
|
|||
|
||||
@Override
|
||||
protected Geometry decode(Object o) {
|
||||
return JTS.to(decoder.convert(o));
|
||||
return ( o != null) ? JTS.to(decoder.convert(o)) : null;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -65,24 +65,16 @@ hibernate.connection.username sa
|
|||
##
|
||||
#hibernate.dialect org.hibernate.spatial.dialect.oracle.OracleSpatial10gDialect
|
||||
#hibernate.connection.driver_class oracle.jdbc.driver.OracleDriver
|
||||
#hibernate.connection.url jdbc:oracle:thin:@oracle11g.geovise.com:1521/orcl11g.geovise.com
|
||||
#hibernate.connection.url jdbc:oracle:thin:@ec2-54-170-61-24.eu-west-1.compute.amazonaws.com:1521/ORCL
|
||||
#hibernate.connection.username HBS
|
||||
#hibernate.connection.password HBS
|
||||
|
||||
|
||||
##
|
||||
## Test Oracle ogc_strict property setting
|
||||
##
|
||||
#hibernate.spatial.ogc_strict false
|
||||
|
||||
##
|
||||
## Oracle 10g
|
||||
##
|
||||
#hibernate.dialect org.hibernate.spatial.dialect.oracle.OracleSpatial10gDialect
|
||||
#hibernate.connection.driver_class oracle.jdbc.driver.OracleDriver
|
||||
#hibernate.connection.url jdbc:oracle:thin:@oracle.geovise.com/ORCL
|
||||
#hibernate.connection.username hbs
|
||||
#hibernate.connection.password hbs
|
||||
|
||||
|
||||
##
|
||||
## MS SQL Server dialect
|
||||
|
|
Loading…
Reference in New Issue