mirror of
https://github.com/neondatabase/neon.git
synced 2025-12-23 06:09:59 +00:00
Remove the Flaky Test computed-columns from postgis v16 (#12132)
## Problem The `computed_columns` test assumes that computed columns are always faster than the request itself. However, this is not always the case on Neon, which can lead to flaky results. ## Summary of changes The `computed_columns` test is excluded from the PostGIS test for PostgreSQL v16, accompanied by related patch refactoring.
This commit is contained in:
@@ -1,9 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/sh
|
||||||
set -ex
|
set -ex
|
||||||
cd "$(dirname "$0")"
|
cd "$(dirname "$0")"
|
||||||
if [[ ${PG_VERSION} = v17 ]]; then
|
patch -p1 <"postgis-common-${PG_VERSION}.patch"
|
||||||
sed -i '/computed_columns/d' regress/core/tests.mk
|
trap 'echo Cleaning up; patch -R -p1 <postgis-common-${PG_VERSION}.patch' EXIT
|
||||||
fi
|
|
||||||
patch -p1 <postgis-no-upgrade-test.patch
|
|
||||||
trap 'echo Cleaning up; patch -R -p1 <postgis-no-upgrade-test.patch' EXIT
|
|
||||||
make installcheck-base
|
make installcheck-base
|
||||||
@@ -1,3 +1,19 @@
|
|||||||
|
diff --git a/regress/core/tests.mk b/regress/core/tests.mk
|
||||||
|
index 3abd7bc..64a9254 100644
|
||||||
|
--- a/regress/core/tests.mk
|
||||||
|
+++ b/regress/core/tests.mk
|
||||||
|
@@ -144,11 +144,6 @@ TESTS_SLOW = \
|
||||||
|
$(top_srcdir)/regress/core/concave_hull_hard \
|
||||||
|
$(top_srcdir)/regress/core/knn_recheck
|
||||||
|
|
||||||
|
-ifeq ($(shell expr "$(POSTGIS_PGSQL_VERSION)" ">=" 120),1)
|
||||||
|
- TESTS += \
|
||||||
|
- $(top_srcdir)/regress/core/computed_columns
|
||||||
|
-endif
|
||||||
|
-
|
||||||
|
ifeq ($(shell expr "$(POSTGIS_GEOS_VERSION)" ">=" 30700),1)
|
||||||
|
# GEOS-3.7 adds:
|
||||||
|
# ST_FrechetDistance
|
||||||
diff --git a/regress/runtest.mk b/regress/runtest.mk
|
diff --git a/regress/runtest.mk b/regress/runtest.mk
|
||||||
index c051f03..010e493 100644
|
index c051f03..010e493 100644
|
||||||
--- a/regress/runtest.mk
|
--- a/regress/runtest.mk
|
||||||
35
docker-compose/ext-src/postgis-src/postgis-common-v17.patch
Normal file
35
docker-compose/ext-src/postgis-src/postgis-common-v17.patch
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
diff --git a/regress/core/tests.mk b/regress/core/tests.mk
|
||||||
|
index 9e05244..90987df 100644
|
||||||
|
--- a/regress/core/tests.mk
|
||||||
|
+++ b/regress/core/tests.mk
|
||||||
|
@@ -143,8 +143,7 @@ TESTS += \
|
||||||
|
$(top_srcdir)/regress/core/oriented_envelope \
|
||||||
|
$(top_srcdir)/regress/core/point_coordinates \
|
||||||
|
$(top_srcdir)/regress/core/out_geojson \
|
||||||
|
- $(top_srcdir)/regress/core/wrapx \
|
||||||
|
- $(top_srcdir)/regress/core/computed_columns
|
||||||
|
+ $(top_srcdir)/regress/core/wrapx
|
||||||
|
|
||||||
|
# Slow slow tests
|
||||||
|
TESTS_SLOW = \
|
||||||
|
diff --git a/regress/runtest.mk b/regress/runtest.mk
|
||||||
|
index 4b95b7e..449d5a2 100644
|
||||||
|
--- a/regress/runtest.mk
|
||||||
|
+++ b/regress/runtest.mk
|
||||||
|
@@ -24,16 +24,6 @@ check-regress:
|
||||||
|
|
||||||
|
@POSTGIS_TOP_BUILD_DIR=$(abs_top_builddir) $(PERL) $(top_srcdir)/regress/run_test.pl $(RUNTESTFLAGS) $(RUNTESTFLAGS_INTERNAL) $(TESTS)
|
||||||
|
|
||||||
|
- @if echo "$(RUNTESTFLAGS)" | grep -vq -- --upgrade; then \
|
||||||
|
- echo "Running upgrade test as RUNTESTFLAGS did not contain that"; \
|
||||||
|
- POSTGIS_TOP_BUILD_DIR=$(abs_top_builddir) $(PERL) $(top_srcdir)/regress/run_test.pl \
|
||||||
|
- --upgrade \
|
||||||
|
- $(RUNTESTFLAGS) \
|
||||||
|
- $(RUNTESTFLAGS_INTERNAL) \
|
||||||
|
- $(TESTS); \
|
||||||
|
- else \
|
||||||
|
- echo "Skipping upgrade test as RUNTESTFLAGS already requested upgrades"; \
|
||||||
|
- fi
|
||||||
|
|
||||||
|
check-long:
|
||||||
|
$(PERL) $(top_srcdir)/regress/run_test.pl $(RUNTESTFLAGS) $(TESTS) $(TESTS_SLOW)
|
||||||
@@ -125,7 +125,7 @@ index 7a36b65..ad78fc7 100644
|
|||||||
DROP SCHEMA tm CASCADE;
|
DROP SCHEMA tm CASCADE;
|
||||||
+
|
+
|
||||||
diff --git a/regress/core/tests.mk b/regress/core/tests.mk
|
diff --git a/regress/core/tests.mk b/regress/core/tests.mk
|
||||||
index 3abd7bc..94903c3 100644
|
index 64a9254..94903c3 100644
|
||||||
--- a/regress/core/tests.mk
|
--- a/regress/core/tests.mk
|
||||||
+++ b/regress/core/tests.mk
|
+++ b/regress/core/tests.mk
|
||||||
@@ -23,7 +23,6 @@ current_dir := $(dir $(abspath $(lastword $(MAKEFILE_LIST))))
|
@@ -23,7 +23,6 @@ current_dir := $(dir $(abspath $(lastword $(MAKEFILE_LIST))))
|
||||||
@@ -160,18 +160,6 @@ index 3abd7bc..94903c3 100644
|
|||||||
$(top_srcdir)/regress/core/wkb \
|
$(top_srcdir)/regress/core/wkb \
|
||||||
$(top_srcdir)/regress/core/wkt \
|
$(top_srcdir)/regress/core/wkt \
|
||||||
$(top_srcdir)/regress/core/wmsservers \
|
$(top_srcdir)/regress/core/wmsservers \
|
||||||
@@ -144,11 +140,6 @@ TESTS_SLOW = \
|
|
||||||
$(top_srcdir)/regress/core/concave_hull_hard \
|
|
||||||
$(top_srcdir)/regress/core/knn_recheck
|
|
||||||
|
|
||||||
-ifeq ($(shell expr "$(POSTGIS_PGSQL_VERSION)" ">=" 120),1)
|
|
||||||
- TESTS += \
|
|
||||||
- $(top_srcdir)/regress/core/computed_columns
|
|
||||||
-endif
|
|
||||||
-
|
|
||||||
ifeq ($(shell expr "$(POSTGIS_GEOS_VERSION)" ">=" 30700),1)
|
|
||||||
# GEOS-3.7 adds:
|
|
||||||
# ST_FrechetDistance
|
|
||||||
diff --git a/regress/loader/tests.mk b/regress/loader/tests.mk
|
diff --git a/regress/loader/tests.mk b/regress/loader/tests.mk
|
||||||
index 1fc77ac..c3cb9de 100644
|
index 1fc77ac..c3cb9de 100644
|
||||||
--- a/regress/loader/tests.mk
|
--- a/regress/loader/tests.mk
|
||||||
|
|||||||
@@ -125,7 +125,7 @@ index 7a36b65..ad78fc7 100644
|
|||||||
DROP SCHEMA tm CASCADE;
|
DROP SCHEMA tm CASCADE;
|
||||||
+
|
+
|
||||||
diff --git a/regress/core/tests.mk b/regress/core/tests.mk
|
diff --git a/regress/core/tests.mk b/regress/core/tests.mk
|
||||||
index 9e05244..a63a3e1 100644
|
index 90987df..74fe3f1 100644
|
||||||
--- a/regress/core/tests.mk
|
--- a/regress/core/tests.mk
|
||||||
+++ b/regress/core/tests.mk
|
+++ b/regress/core/tests.mk
|
||||||
@@ -16,14 +16,13 @@ POSTGIS_PGSQL_VERSION=170
|
@@ -16,14 +16,13 @@ POSTGIS_PGSQL_VERSION=170
|
||||||
@@ -168,16 +168,6 @@ index 9e05244..a63a3e1 100644
|
|||||||
$(top_srcdir)/regress/core/wkb \
|
$(top_srcdir)/regress/core/wkb \
|
||||||
$(top_srcdir)/regress/core/wkt \
|
$(top_srcdir)/regress/core/wkt \
|
||||||
$(top_srcdir)/regress/core/wmsservers \
|
$(top_srcdir)/regress/core/wmsservers \
|
||||||
@@ -143,8 +139,7 @@ TESTS += \
|
|
||||||
$(top_srcdir)/regress/core/oriented_envelope \
|
|
||||||
$(top_srcdir)/regress/core/point_coordinates \
|
|
||||||
$(top_srcdir)/regress/core/out_geojson \
|
|
||||||
- $(top_srcdir)/regress/core/wrapx \
|
|
||||||
- $(top_srcdir)/regress/core/computed_columns
|
|
||||||
+ $(top_srcdir)/regress/core/wrapx
|
|
||||||
|
|
||||||
# Slow slow tests
|
|
||||||
TESTS_SLOW = \
|
|
||||||
diff --git a/regress/loader/tests.mk b/regress/loader/tests.mk
|
diff --git a/regress/loader/tests.mk b/regress/loader/tests.mk
|
||||||
index ac4f8ad..4bad4fc 100644
|
index ac4f8ad..4bad4fc 100644
|
||||||
--- a/regress/loader/tests.mk
|
--- a/regress/loader/tests.mk
|
||||||
|
|||||||
@@ -10,8 +10,8 @@ psql -d contrib_regression -c "ALTER DATABASE contrib_regression SET TimeZone='U
|
|||||||
-c "CREATE EXTENSION postgis_tiger_geocoder CASCADE" \
|
-c "CREATE EXTENSION postgis_tiger_geocoder CASCADE" \
|
||||||
-c "CREATE EXTENSION postgis_raster SCHEMA public" \
|
-c "CREATE EXTENSION postgis_raster SCHEMA public" \
|
||||||
-c "CREATE EXTENSION postgis_sfcgal SCHEMA public"
|
-c "CREATE EXTENSION postgis_sfcgal SCHEMA public"
|
||||||
patch -p1 <postgis-no-upgrade-test.patch
|
patch -p1 <"postgis-common-${PG_VERSION}.patch"
|
||||||
patch -p1 <"postgis-regular-${PG_VERSION}.patch"
|
patch -p1 <"postgis-regular-${PG_VERSION}.patch"
|
||||||
psql -d contrib_regression -f raster_outdb_template.sql
|
psql -d contrib_regression -f raster_outdb_template.sql
|
||||||
trap 'patch -R -p1 <postgis-no-upgrade-test.patch && patch -R -p1 <"postgis-regular-${PG_VERSION}.patch"' EXIT
|
trap 'patch -R -p1 <postgis-regular-${PG_VERSION}.patch && patch -R -p1 <"postgis-common-${PG_VERSION}.patch"' EXIT
|
||||||
POSTGIS_REGRESS_DB=contrib_regression RUNTESTFLAGS=--nocreate make installcheck-base
|
POSTGIS_REGRESS_DB=contrib_regression RUNTESTFLAGS=--nocreate make installcheck-base
|
||||||
Reference in New Issue
Block a user