From eb76e2f3484039b05c585efc96354a282771589d Mon Sep 17 00:00:00 2001 From: Vicky Vergara Date: Tue, 9 Jan 2024 13:51:03 -0600 Subject: [PATCH] Fixing issue 2602 (#2604) * fix #2302 test fails for pgr_stoerWagner * PostgreSQL 11 is no longer supported * Fixing test * Updating boost versions to test --- .github/workflows/boost_version.yml | 12 +++++++----- .github/workflows/ubuntu.yml | 2 +- pgtap/mincut/stoerWagner/compare_components.pg | 8 ++++++-- 3 files changed, 14 insertions(+), 8 deletions(-) diff --git a/.github/workflows/boost_version.yml b/.github/workflows/boost_version.yml index 4ffb372ed0..afc490150b 100644 --- a/.github/workflows/boost_version.yml +++ b/.github/workflows/boost_version.yml @@ -18,10 +18,12 @@ name: Boost supported versions # Currently # - boost::geometry has not changed anything we use # -# - boost::graph changed on 1.80 -# - boost::graph 1.75 requires C++14 -# - boost::graph changed on 1.68 -# - 1.56 is the minimum version we ask +# boost::graph +# - 1.84 is failing its own tests (Jul 2022) +# - 1.80 changed on 1.80 (Aug 2022) +# - 1.75 requires C++14 (Dec 2020) +# - 1.68 changed on 1.68 (Aug 2018) +# - 1.56 is the minimum version we ask (Aug 2014) on: push: @@ -65,7 +67,7 @@ jobs: strategy: fail-fast: false matrix: - boost_minor: [56, 68, 75] + boost_minor: [56, 68, 75, 76, 77, 78, 79, 80, 84] steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml index 3df30812c4..60711b3860 100644 --- a/.github/workflows/ubuntu.yml +++ b/.github/workflows/ubuntu.yml @@ -29,7 +29,7 @@ jobs: strategy: fail-fast: false matrix: - psql: [11,12,13,14,15,16] + psql: [12,13,14,15,16] postgis: [3] os: [ubuntu-latest, ubuntu-20.04] diff --git a/pgtap/mincut/stoerWagner/compare_components.pg b/pgtap/mincut/stoerWagner/compare_components.pg index e62a0e058e..c67c96c407 100644 --- a/pgtap/mincut/stoerWagner/compare_components.pg +++ b/pgtap/mincut/stoerWagner/compare_components.pg @@ -85,6 +85,7 @@ SELECT * FROM pgr_stoerWagner( ) $$ ); +SELECT set_eq('stoerWagner5', 'stoerWagner6', '5: Mincut of edge 17'); PREPARE stoerWagner7 AS SELECT * @@ -93,8 +94,11 @@ FROM pgr_stoerWagner( FROM edges WHERE id < 17 ORDER BY id' ); -SELECT set_eq('stoerWagner5', 'stoerWagner6', '5: Mincut of edge 17'); -SELECT set_eq('stoerWagner7', 'VALUES (1, 1, 1, 1)', '6: Compare the mincut of subgraph with actual result'); +SELECT CASE WHEN (SELECT boost FROM pgr_full_version()) < '1.80' THEN + collect_tap(set_eq('stoerWagner7', 'VALUES (1, 1, 1, 1)', '6: Compare the mincut of subgraph with actual result')) +ELSE + collect_tap(set_eq('stoerWagner7', 'VALUES (1, 14, 1, 1)', '6: Compare the mincut of subgraph with actual result')) +END CASE; SELECT * FROM finish(); ROLLBACK;