Hi all,
as part of the GS3 effort we are removing all usage points of the H2 embedded database, little by little. WFS has a few tests that use H2, in particular, for sql views and joins.
Joins is a case where we cannot replace H2 with GeoPackage, as the eventual spatial join needs to be translated down to SQL, thre is no “let’s filter in memory later” for the join condition.
So my intention is to move those tests to PostGIS using TestContainers. Wondering… should these tests be marked as OnlineTest and executed only when an online profile is enabled?
On one side, testcontainers won’t work out of the box on every machine, docker or podman need to be available… but it’s also possible to check if the necessary enviroment is available.
On the other side, these tests tend to be a bit slower, and the first time the container image needs tobe downloaded, it will take time.
Neither seems like a showstopper to me, but I wanted to check how others feel about it
Cheers
Andrea
Hi Andrea,
Is the reason for removal of H2 for security vulnerabilities? I noticed its making it into the war, but listed as test scope in the pom, so not sure why its getting packaged. If its only needed for tests, maybe it can be left alone and just fix whatever script is packaging it.
Hi Jason,
H2 is not packaged by default, but will come back in if you use certain plugins, like NetCDF/GRIB, a flavor of GeoFence. It’s also used as cheap replacement for postgis in image mosaic, WFS, and other security tests.
As part of the GeoServer 3 effort we are eliminating it, fully, from the codebase, this discussion is about eliminating one of the usage points, other PRs are already coming in to remove it from GWC (optional but still possible) and as a downloadable datastore plugin.
Cheers
Andrea
Just as as point of reference, we use testcontainers for postgis in GeoMesa and it takes ~2.5 seconds to start up when running through github actions (and a similar amount of time when I run it locally).
Thanks,
Emilio
1 Like