Torben, I can confirm that if I set my local timezone to America/Vancouver, I get the following gt-jdbc-postgis failures:
Failed tests: PostgisDateOnlineTest>OnlineTestCase.run:123->JDBCDateOnlineTest.testFiltersByDate:45 expected:<2> but was:<1> PostgisUDTOnlineTest>OnlineTestCase.run:123->testRead:81 expected:<2004-10-[30 17]:30:00.0> but was:<2004-10-[29 21]:30:00.0> PostgisDateOnlineTest>OnlineTestCase.run:123->JDBCDateOnlineTest.testFiltersByDate:45 expected:<2> but was:<1> Not sure about the middle one as it looks suspiciously close to the 21 hours between us. I restarted postgres but I did not change the time zone of the test database, which is still set to NZ. Might need to get these to match for the test to pass. I am using postgres 9.4 and the default timezone setting changed in 9.something. Have you created a Jira issue for this failure? Kind regards, Ben. On 19/02/15 11:36, Ben Caradoc-Davies wrote: > Torben, > > aha, well spotted! I recall similar (non-postgis) failures in the past, > for tests that worked only for timezones behind UTC. The solution was to > ensure more robust timezone handling in test fixtures and assertions. > > Causes? > > (1) As far as I know, nobody regularly runs PostGIS online tests except > CSIRO in Western Australia (UTC+8, I set up these Jenkins jobs when I > worked there), and me running them locally in New Zealand (NZDT UTC+13). > https://www.seegrid.csiro.au/wiki/Infosrvices/JenkinsGeoserverMaster > https://www.seegrid.csiro.au/wiki/Infosrvices/JenkinsGeoserverMasterTechnicalNotes > https://cgsrv8.arrc.csiro.au/jenkins/view/geoserver-master/ > This one will run postgis tests (just stopped until they add -Ponline in > response to your OnlineTest renaming): > https://cgsrv8.arrc.csiro.au/jenkins/view/geoserver-master/job/geotools-master/ > > (2) I do not know what date handling changes might have been made, but > Andrea modified SimplifyingFilterVisitor in November. This did not break > online postgis tests on the above mentioned hosts in timezones with > positive UTC offset. Andrea is (usually) in UTC+1 so may also have been > immune if he ran online tests against postgis. > https://jira.codehaus.org/browse/GEOT-4938 > > Kind regards, > Ben. > > On 19/02/15 10:44, Torben Barsballe wrote: >> Thanks for that link Ben. It looks like we are kind of stuck until we get a >> postgis driver that fufills all our needs. >> >> The two Date test failures are unrelated to that issue however. >> >> The test case defines: >> DateFormat df = new SimpleDateFormat("yyyy-dd-MM"); >> df.setTimeZone( TimeZone.getTimeZone("PST")); >> Then, it constructs a query, calling df.parse("2009-28-06"), which returns >> a java.util.Date: "Sun Jun 28 00:00:00 PDT 2009" (Notice the timezone) >> This query eventually has a simplifyingFilterVisitor called on it, which >> causes the date to be cast to a java.sql.Date: "2009-27-06" >> Since sql dates have no time component, the time is truncated and due to >> the timezone results in the 27th. >> >> I assume this test was intended to verify dates that are both < and = to a >> value (Currently, the = portion is what is failing). >> I am curious as to what has changed to make it fail now and not before. >> >> Torben >> >> On Wed, Feb 18, 2015 at 10:17 AM, Ben Caradoc-Davies <b...@transient.nz> >> wrote: >> >>> Torben, >>> >>> please see the discussion in this Jira issue about the various postgres >>> driver versions and the differing failures they cause. >>> https://jira.codehaus.org/browse/GEOT-4636 >>> >>> You might add any new findings to this issue. >>> >>> Kind regards, >>> Ben. >>> >>> On 19/02/15 07:05, Torben Barsballe wrote: >>> >>>> I have recently been running the Online PostGIS tests, and have run into a >>>> number of existing failures: >>>> >>>> Failed tests: >>>> >>>> PostgisDateOnlineTest>OnlineTestCase.run:123->JDBCDateOnlineTest. >>>> testFiltersByDate:45 >>>> expected:<2> but was:<1> >>>> >>>> PostgisLobOnlineTest>OnlineTestCase.run:123-> >>>> JDBCLobOnlineTest.testWrite:84 >>>> null >>>> >>>> PostgisLobOnlineTest>OnlineTestCase.run:123-> >>>> JDBCLobOnlineTest.testRead:66 >>>> null >>>> >>>> PostgisDateOnlineTest>OnlineTestCase.run:123->JDBCDateOnlineTest. >>>> testFiltersByDate:45 >>>> expected:<2> but was:<1> >>>> >>>> PostgisLobOnlineTest>OnlineTestCase.run:123-> >>>> JDBCLobOnlineTest.testWrite:84 >>>> null >>>> >>>> PostgisLobOnlineTest>OnlineTestCase.run:123-> >>>> JDBCLobOnlineTest.testRead:66 >>>> null >>>> >>>> I also observed these failures when testing the 11.5 release. >>>> >>>> I see there is an existing unresolved issue for this problem here: >>>> https://jira.codehaus.org/browse/GEOT-4594, with a viable solution >>>> (upgrade >>>> the postgres driver) >>>> >>>> Is there any reason we do not upgrade to a newer version of the postgres >>>> driver? >>>> I've tested locally with version 9.1-901.jdbc3 >>>> <http://mvnrepository.com/artifact/postgresql/postgresql/9.1-901.jdbc3>, >>>> and it fixed the lob failures, but gave a bunch of new ones: >>>> >>>> Failed tests: >>>> >>>> PostGISFunctionTest>OnlineTestCase.run:123->JDBCFunctionTest. >>>> testStrEndsWithOtherProperty:101->JDBCFunctionTest.assertFeatures:319 >>>> Expected to find 3 features, but was 1 >>>> >>>> PostgisDataStoreTest>OnlineTestCase.run:123->JDBCDataStoreTest. >>>> testSimpleIndex:208 >>>> expected:<[stringProperty]> but was:<["stringProperty"]> >>>> >>>> PostgisDataStoreTest>OnlineTestCase.run:123->JDBCDataStoreTest. >>>> testMultiColumnIndex:249 >>>> expected:<[stringProperty]> but was:<["stringProperty"]> >>>> PostgisDateTest>OnlineTestCase.run:123->JDBCDateTest. >>>> testFiltersByDate:45 >>>> expected:<2> but was:<1> >>>> >>>> PostgisDataStoreTest>OnlineTestCase.run:123->JDBCDataStoreTest. >>>> testSimpleIndex:208 >>>> expected:<[stringProperty]> but was:<["stringProperty"]> >>>> >>>> PostgisDataStoreTest>OnlineTestCase.run:123->JDBCDataStoreTest. >>>> testMultiColumnIndex:249 >>>> expected:<[stringProperty]> but was:<["stringProperty"]> >>>> PostgisDateTest>OnlineTestCase.run:123->JDBCDateTest. >>>> testFiltersByDate:45 >>>> expected:<2> but was:<1> >>>> >>>> The two DateTest failures are the same, but the others are different, and >>>> seem to be a simple change in result syntax. >>>> >>>> Thanks, >>>> Torben >>>> >>>> >>>> >>>> Torben >>>> >>>> >>>> >>>> ------------------------------------------------------------ >>>> ------------------ >>>> Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server >>>> from Actuate! Instantly Supercharge Your Business Reports and Dashboards >>>> with Interactivity, Sharing, Native Excel Exports, App Integration & more >>>> Get technology previously reserved for billion-dollar corporations, FREE >>>> http://pubads.g.doubleclick.net/gampad/clk?id=190641631& >>>> iu=/4140/ostg.clktrk >>>> >>>> >>>> >>>> _______________________________________________ >>>> GeoTools-Devel mailing list >>>> GeoTools-Devel@lists.sourceforge.net >>>> https://lists.sourceforge.net/lists/listinfo/geotools-devel >>>> >>>> >>> -- >>> Ben Caradoc-Davies <b...@transient.nz> >>> Software Engineer >>> Transient Software <http://transient.nz> >>> New Zealand >>> >> > -- Ben Caradoc-Davies <b...@transient.nz> Software Engineer Transient Software <http://transient.nz> New Zealand ------------------------------------------------------------------------------ Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server from Actuate! Instantly Supercharge Your Business Reports and Dashboards with Interactivity, Sharing, Native Excel Exports, App Integration & more Get technology previously reserved for billion-dollar corporations, FREE http://pubads.g.doubleclick.net/gampad/clk?id=190641631&iu=/4140/ostg.clktrk _______________________________________________ GeoTools-Devel mailing list GeoTools-Devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geotools-devel