Niels and Andrea,

I am running postgis/postgis:16-3.4 which is the latest recommended. I
assume postgis is installed when I am using that instance.

The postgis/postgis image provides tags for running Postgres with PostGIS⁠
> extensions installed.
>


*GeoTools*
I  used the same approach with ~/geotools/postgis.properties - to confirm I
changed to match Andrea's example with the following Dockerfile.

services:
  db:
    image: postgis/postgis:16-3.4
    platform: linux/amd64
    restart: always
    environment:
      POSTGRES_PASSWORD: 'mysecret'
      POSTGRES_USER: 'myuser'
      POSTGRES_DB: 'app-schema'
    volumes:
      - /Users/jgarnett/dev/geoserver/testing/db:/var/lib/postgresql/data
    ports:
      - 5432:5432

During startup I can see that PostGIS extension is being installed:

db-1  | CREATE EXTENSION
>
db-1  | Loading PostGIS extensions into app-schema
>

For good measure I confirmed by running the jdbc-postgis online tests
successfully.

*GeoServer*

Andrea your example used -Ponline but perhaps you just had the geotools
build in mind.  If I use the same thing as the builds server:

cd src/extensions/app-schema
mvn clean install -Papp-schema-online-test -nsu -fae

Results in the following failures:

[INFO] Application Schema Support ......................... SUCCESS [
 3.180 s]
[INFO] Application Schema Module .......................... SUCCESS [
 3.175 s]
[INFO] Application Schema Integration Test ................ FAILURE [02:04
min]
[INFO] Sample DataAccess Integration Test ................. SUCCESS [
 3.817 s]
[INFO] Application Schema Integration Online Test with Oracle Database
FAILURE [  6.723 s]
[INFO] Application Schema Integration Online Test with Postgis Database
SUCCESS [02:40 min]
[INFO] Application Schema MongoDB Integration Test ........ SUCCESS [
 4.095 s]
[INFO] Application Schema Solr Integration Test ........... SUCCESS [
 1.278 s]
[INFO] Application Schema Indexes Integration Test ........ SUCCESS [
 1.467 s]
[INFO] Application Schema Geopackage Integration Test ..... FAILURE [
 9.565 s]

For the geoserver build can you try  -Papp-schema-online-test which is what
is used by the build server. I would like to see if you get the same
failure as me?

I am curious that Application Schema Integration Test and Application
Schema Geopackage Integration Test fail presently.
--
Jody Garnett


On Jul 9, 2024 at 1:39:05 PM, Niels Charlier <ni...@scitus.be> wrote:

> Seems you are missing the postgis extension, but I have no idea why that
> is in the script, that is strange indeed.
> On 09/07/2024 08:28, Jody Garnett wrote:
>
> Niels,
>
> How do you run the app-schema tests?
>
>
>    1. I create a ~/.geoserver/postgis.properties with connection
>    parameters including a database name
>    2. And then run with:
>    mvn clean install -Papp-schema-online-test
>
>
> When I run I get errors such as:
>
> [ERROR]
> testNoPrimaryKey(org.geoserver.test.onlineTest.WfsOnlinePostgisTest)  Time
> elapsed: 0.294 s  <<< ERROR!
> org.postgresql.util.PSQLException:
> ERROR: function public.ndims(public.geometry) does not exist
>   Hint: No function matches the given name and argument types. You might
> need to add explicit type casts.
>   Position: 355
>
> Looking at the build server job configuration I am shocked to see this is
> defined as part of the script:
>
>
> #missing functions required for refdataset sql but removed in postgis 2.1
> export PGPASSWORD=''
> psql -h localhost -p 5432 -U geotools -d geotoolstest -c 'create or
> replace function public.ndims(g geometry) returns smallint as $$ begin
> return public.st_ndims(g); end; $$ language plpgsql immutable strict;'
> psql -h localhost -p 5432 -U geotools -d geotoolstest -c 'create or
> replace function public.srid(g geometry) returns integer as $$ begin return
> public.st_srid(g); end; $$ language plpgsql immutable strict;'
>
>
> Surely that cannot be right?
> Is defining ndims part of the app schema installation instructions? No...
>
> I How do you run the tests locally...
> --
> Jody Garnett
>
>
> On Jul 8, 2024 at 5:29:42 AM, Niels Charlier <ni...@scitus.be> wrote:
>
>> Hello Jody
>>
>> I have always run those tests locally whenever making changes that affect
>> app-schema, not sure about Jenkins issues.
>>
>> Kind Regards
>>
>> Niels
>> On 06/07/2024 00:43, Jody Garnett wrote:
>>
>> I have a PR
>> <https://dficcfc.r.af.d.sendibt2.com/tr/cl/QnmEf4CiLzefQ8tvswpygu_mKOoVQYE_ymKm8YxI8KlC5Oky3xgemTOMFlheDxw7yfA0Ckx8oGqw94a_hRDOlVGXZewXdciN7xvD7M_rEd1R1rtu2mMm59pwZkkH2ZiMCWaeHCpmMWjPZd9E9F6M7TJtVQYL6Juaazw0CeqmAs90WSKZg5UI6sm8-3kOEC137-01Uu5tc2aY7FtDR-RwG1pkloVK2u99LweEcTF6j2KySuBjL90_-4IjweVKflwwU6cfARFQDGeH5iSioGKRuHZ7ZlMdX-73ykakFUTCQcrnS-EW>
>> that looks at some gaps in the GeoTools feature model around validation...
>> and Niels made the perfectly sensible recommendation to run the app-schema
>> online tests...
>>
>>
>>    1. Checking build.geoserver.org
>>    
>> <https://dficcfc.r.af.d.sendibt2.com/tr/cl/XzwiyRYFMgufdjTffCOZKuLas1HzYo0A3G72jOEFBlOrZhk15PUdzFckDA1jFwcllUEiVQf6DKw68XxItKGLGa_2j5AP4TDPcUVDSLIaM6ZZkc1fnToljiZcp6hoYtejFQ9NY3IFWDnwTnMoyGKjIND376ahzpSRmwOuyi-qg9HKc_mfbNkdj2ZiWqCxPnIqI3RM8HSIx-C2D5RqmkXtDuQ-f-Ihutyv_OxLvVyT-j0MrOkLGFf2fr-6nKMioMiX750R24zo5Vw>
>>    the geoserver-main-app-schema-online
>>    
>> <https://dficcfc.r.af.d.sendibt2.com/tr/cl/Ds5yMP0W1nLQwCo3m3ZabKQg8Jh23U86KCnuN506HyWCU_4ODqDvVJrIJzYbBRDZwAuXUBwR71PGYTp23w6jz_JmJtiPcq0MQTZygJYByi5KCStdM_mNHPWewpnAKJmLclqereIIZ0vgfvcNEtpqj82LW2kzfLFIpFvLJSVpK3L8sKE6Kq9c2I80ouevPJIq7lfJfNVHLgfK9fgV766Z2zy1Ky67C9bcm__h3JLGg8QycLVrCSz9SHnqqmb7T3Xh0n3NLvQjE3kM-iKcCDi8clbWOmRL7HOz2o-uC2ugxZml7bxBSUnbVUPUnUJjRQFX_fjZEPrpBXq4DznMFs1KD7p71tgFScz9>
>>    is disabled
>>    2. Looking at the configuration it was java 8 based, so this has been
>>    disabled for some time
>>    3. The setup has a lot of messing around to get the ojdbc7.jar to
>>    talk to oracle-db.dev.boundlessgeo.com
>>    
>> <https://dficcfc.r.af.d.sendibt2.com/tr/cl/unOkFWXeyJmZIY8qRTRfEOWS7MGyOk4vkdzoJyUiwkcH9yRsDojjPS_a77MX248fX9iZJGLRLX_qf5Rhme4iUNeTWwPvePI2TTI46ny9WtEcprgjPVkdaKgW5yZV8sbuW4InphYTDd0l1E7xMMxaUvthsp69SyJB2DiWJ4IJiYU7u2Kgb2xPk_qYdiLx57HZKfzX2_SwJtpS5nD-ZmeJm7F5DF2VZKTj6qgTUd6HnHQnvGM9X1JvFm60YhkBoEIJfXLt7P-eHDHbvODtvxVsyQK_lQ>
>>    ... so quite a long time.
>>
>>
>> Do we have an active module maintainer (or experienced developer) for
>> application schema?
>>
>> Trying it out:
>>
>>    - I do not think the steps to copy ojdbc7.jar are required any more
>>    (since such a jar is now available via maven dependency)
>>    - Changing to Java 11 and commenting out the oracle.properties test
>>    fixed and running the job shows
>>    
>> <https://dficcfc.r.af.d.sendibt2.com/tr/cl/LfbWvC9tnFQ2Kw5ymOBeMXXeT8KmZn9PWK0NdXq52y5AYgfeX8mz06QT5ntFE-CKVt-ayEtPArTWSd2tixGSIEsOCw19g25HJNXHOpr7XEwluNq1_BUiIrzgr0flipi2EIBE8KbuuRpPJXKaGRA2Lc0Nq-UGcqd0p5tdbGWmOc5AA4-VnX7OxNt0O9ruU8yWc999jWsXXc3VeywtedDPUsdFmae6wzsRP-4lxATCFNfq7_TZn2NA9YJxiX_sa-razs2GEF-J8k9jk_XwnjqgwFLRgTL0v7uOSSiOdKI3ZO1kYTVxFfvfGfeD35FNb9SHic25FOFs2A6n63ff920JMw9Ed0YNZZmfuzP9lex9>
>>    ...
>>
>>
>> *[INFO] Application Schema Support ......................... SUCCESS [
>>  4.694 s]*
>> *[INFO] Application Schema Module .......................... SUCCESS [
>>  9.101 s]*
>> *[INFO] Application Schema Integration Test ................ FAILURE
>> [01:28 min]*
>> *[INFO] Sample DataAccess Integration Test ................. SUCCESS [
>>  4.919 s]*
>> *[INFO] Application Schema Integration Online Test with Postgis Database
>> SUCCESS [01:14 min]*
>> *[INFO] Application Schema Solr Integration Test ........... SUCCESS [
>>  2.659 s]*
>> *[INFO] Application Schema Indexes Integration Test ........ SUCCESS [
>>  1.319 s]*
>> *[INFO] Application Schema Geopackage Integration Test ..... FAILURE [
>> 11.730 s]*
>>
>>
>> So what do you think? Does this test have value? For now I will enable it
>> but not schedule it @daily (in case anyone else wants to look).
>>
>> Thanks
>> --
>> Jody Garnett
>>
>>
_______________________________________________
Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

Reply via email to