Commit b2872888 authored by Andrea Aime's avatar Andrea Aime

Follow up to [GEOS-9161], fixing test failure in postgis online tests

parent b0c20ecc
......@@ -22,6 +22,7 @@ import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.TimeZone;
import javax.xml.transform.OutputKeys;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerException;
......@@ -139,6 +140,7 @@ public abstract class AbstractAppSchemaTestSupport extends GeoServerSystemTestSu
getGeoServer().save(wfs);
// disable schema caching in tests, as schemas are expected to provided on the classpath
SchemaCache.disableAutomaticConfiguration();
TimeZone.setDefault(TimeZone.getTimeZone("UTC"));
}
/**
......
......@@ -16,6 +16,7 @@ import java.util.Objects;
import net.sf.json.JSON;
import net.sf.json.JSONArray;
import net.sf.json.JSONObject;
import org.hamcrest.CoreMatchers;
import org.junit.Test;
/** Validates JSON output format for complex features. */
......@@ -156,7 +157,11 @@ public final class GeoJsonOutputFormatWfsTest extends AbstractAppSchemaTestSuppo
"SF_Specimen",
"samplingTime",
"TimeInstant");
assertThat(timeInstant.getString("timePosition"), is("2014-07-02T00:00:00Z"));
// property file uses a java.util.Date, but the database uses a java.sql.Date, hence
// different encodings
assertThat(
timeInstant.getString("timePosition"),
CoreMatchers.anyOf(is("2014-07-02T00:00:00Z"), is("2014-07-02Z")));
}
@Test
......
_=ID:String,BOREHOLE_ID:String,GEOM:Geometry,SAMPLE_ID:String,SAMPLE_DATA_ID:String,SAMPLING_DATE:Date,SAMPLE_TYPE:String,INTERVAL_BEGIN:Double,INTERVAL_END:Double,PROPERTY:String,NUMERIC_VALUE:Double,UNIT_OF_MEASURE:String,TEXT_VALUE:String,STRATNO:String,STRATNAME:String,TOTAL_DEPTH:double
17322=17322|borehole.GA.17322|POINT(-28.4139 121.142)|100|2251225|2014-07-02T00:00:00Z|core diamond|57.9|66.4|magnetic susceptibility|940|10-5 SI||29921|Arthurton Granite|153.92
17338=17338|borehole.GA.17338|POINT(-12.15 100.142)|102|128|2015-07-02T00:00:00Z|core diamond|85.3|89.6|purpose|||geochronology|29921|Arthurton Granite|91.55
\ No newline at end of file
17338=17338|borehole.GA.17338|POINT(-12.15 100.142)|102|128|2015-07-02Z|core diamond|85.3|89.6|purpose|||geochronology|29921|Arthurton Granite|91.55
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment