[Geoserver-devel] [jira] (GEOS-6883) app-schema online tests fail without Oracle

Ben Caradoc-Davies created an issue

GeoServer / BugGEOS-6883

app-schema online tests fail without Oracle

Issue Type:

BugBug

Affects Versions:

2.7-RC1

Assignee:

Victor Tey

Components:

Application schema

Created:

15/Feb/15 6:53 PM

Environment:

Apache Maven 3.2.5 (12a6b3acb947671f09b81f49094c53f426d8cea1; 2014-12-15T06:29:23+13:00)
Maven home: /home/ben/java/maven
Java version: 1.7.0_75, vendor: Oracle Corporation
Java home: /usr/lib/jvm/java-7-openjdk-amd64/jre
Default locale: en_GB, platform encoding: UTF-8
OS name: “linux”, version: “3.16.0-4-amd64”, arch: “amd64”, family: “unix”

Priority:

MinorMinor

Reporter:

Ben Caradoc-Davies

app-schema online tests fail if run without Oracle because the module app-schema-oracle-test is always included; its test fixtures do not check for the presence of ~/.geoserver/oracle.properties and instead fail if the fixture configuration file is absent. This behaviour prevents testing against postgis without oracle.

These tests are run in src/extension/app-schema:

cd src/extension/app-schema

Workaround is to use the -pl flag present in Maven 3.2.1 or later. Command line becomes:

mvn -nsu -Djava.awt.headless=true -Dtest.maxHeapSize=1024m -Dtest.maxPermSize=128m -Papp-schema-online-test -pl '!app-schema-oracle-test' clean test

With this flag, app-schema online tests pass on master against postgis 2.1.4+dfsg-2 amd64 / postgresql-9.4 9.4.1-1 amd64 on debian/sid.

~/.geoserver/postgis.properties:

driver = org.postgresql.Driver
url = jdbc:postgresql://localhost/refdata
host = localhost
port = 5432
database = refdata
user = refdata
password = XXXXXXXX
passwd = XXXXXXXX
dbtype = postgisng

Database creation:

create database refdata;
\c refdata
create role refdata with login password 'XXXXXXXX';
alter database refdata owner to refdata;
create extension postgis;
alter view geography_columns owner to refdata;
alter view geometry_columns owner to refdata;
alter view raster_columns owner to refdata;
alter view raster_overviews owner to refdata;
alter table spatial_ref_sys owner to refdata;
-- see: http://docs.geoserver.org/latest/en/developer/programming-guide/app-schema/index.html
-- see: http://spatialreference.org/ref/epsg/4979/postgis/
-- note: spatialreference.org srid is wrong: srid 94979 should be 4979
INSERT into spatial_ref_sys (srid, auth_name, auth_srid, proj4text, srtext) values ( 4979, 'epsg', 4979, '+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs ', 'GEOGCS["WGS 84",DATUM["World Geodetic System 1984",SPHEROID["WGS 84",6378137.0,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0.0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.017453292519943295],AXIS["Geodetic latitude",NORTH],AXIS["Geodetic longitude",EAST],AXIS["Ellipsoidal height",UP],AUTHORITY["EPSG","4979"]]');
-- missing functions required for refdataset sql but removed in postgis 2.1
create or replace function public.ndims(g geometry)
returns smallint as $$
begin
    return public.st_ndims(g);
end;
$$ language plpgsql immutable strict;
create or replace function public.srid(g geometry)
returns integer as $$
begin
    return public.st_srid(g);
end;
$$ language plpgsql immutable strict;

Note that West Australians will also need to apply the PostGIS timezone abbreviation fix:
https://www.seegrid.csiro.au/wiki/Infosrvices/JenkinsGeoserverMasterTechnicalNotes#PostGIS_timezone_fix_for_Western_Australia

Add Comment

Add Comment

This message was sent by Atlassian JIRA (v6.1.6#6162-sha1:7af547c)

Atlassian logo