[Geoserver-devel] Testing offline against GeoServer PR-1

I am working offline these days and am having to do a couple of patches to make it through a "maven build -O" ...
I was surprised to find that GeoServerOnlineTest no longer checks the local geoserver (this is a big plus when working away from the big bad internet).

We can do two things:
a) Restore what we had 1) run against localhost default geoserver install + if not available run against refractions test geoserver
b) Explicitly leave GeoServerOnlineTest working against the refractions test geoserver + create GeoServerLocalTest

I have implemented b) and can commit it has the advantage of working with the -O flag, but we will perform the same tests "twice" when building normally (the whole point being that if a local service is available we can avoid external tests).

The other thing I found was that with the latest GeoServer PR1 install our tests no longer work "out of the box" ...
Does GeoServe still ship w/ data? I think it does ... but the following fail:
1 - testFeatureReaderWithFilterBBoxGET(org.geotools.data.wfs.GeoServerLocalTest)
junit.framework.AssertionFailedError: must have 1 feature -- fair assumption
    at junit.framework.Assert.fail(Assert.java:47)
    at junit.framework.Assert.assertTrue(Assert.java:20)
    at org.geotools.data.wfs.WFSDataStoreReadTest.doFeatureReaderWithBBox(WFSDataStoreReadTest.java:184)
    at org.geotools.data.wfs.GeoServerOnlineTest.testFeatureReaderWithFilterBBoxGET(GeoServerOnlineTest.java:147)

2 - testFeatureReaderWithFilterBBoxPOST(org.geotools.data.wfs.GeoServerLocalTest)
junit.framework.AssertionFailedError: must have 1 feature -- fair assumption
    at junit.framework.Assert.fail(Assert.java:47)
    at junit.framework.Assert.assertTrue(Assert.java:20)
    at org.geotools.data.wfs.WFSDataStoreReadTest.doFeatureReaderWithBBox(WFSDataStoreReadTest.java:184)
    at org.geotools.data.wfs.GeoServerOnlineTest.testFeatureReaderWithFilterBBoxPOST(GeoServerOnlineTest.java:153)

So perhaps the default data w/ geoserver has changed and broken these tests? Any advice on how you guys want to deal w/ this one?

Jody Garnett wrote:

The other thing I found was that with the latest GeoServer PR1 install our tests no longer work "out of the box" ...
Does GeoServe still ship w/ data? I think it does ... but the following fail:

Here is the code that geotools uses to test a default geoserver install:

    // RR change the data?
    // NOPE, it's in Lat-Long for the Env, BCAlbers for the data
    public void testFeatureReaderWithFilterBBoxGET() throws NoSuchElementException, IllegalAttributeException, IOException, SAXException, IllegalFilterException{
        // minx,miny,maxx,maxy
// Envelope bbox = new Envelope(-75.791435,38.44949,-75.045998,39.840008); // lat long
        Envelope bbox = new Envelope(556759.0,5233034,556934, 5233040.0); // bc albers
        WFSDataStoreReadTest.doFeatureReaderWithBBox(url,true,false,0,bbox);
    }
    public void testFeatureReaderWithFilterBBoxPOST() throws NoSuchElementException, IllegalAttributeException, IOException, SAXException, IllegalFilterException{
        // minx,miny,maxx,maxy
// Envelope bbox = new Envelope(-75.791435,38.44949,-75.045998,39.840008); // lat long
      Envelope bbox = new Envelope(556759.0,5233034,556934, 5233040.0); // bc albers
        WFSDataStoreReadTest.doFeatureReaderWithBBox(url,true,false,0,bbox);
    }

With the latest PR1 release these tests fail, what should we do? We could figure out the bbox (and maybe cut it in half?) from the capabilities and project it into the data srs before making the request,
or if someone can switch this to agree with PR1....

Jody