Skip to content

Commit

Permalink
Fixing issue 2602 (#2604)
Browse files Browse the repository at this point in the history
* fix #2302 test fails for pgr_stoerWagner
* Fixing test
* Updating boost version to test

(cherry picked from commit eb76e2f)
  • Loading branch information
cvvergara committed Feb 6, 2024
1 parent 68d472c commit 074647e
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 deletions.
12 changes: 7 additions & 5 deletions .github/workflows/boost_version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down
8 changes: 6 additions & 2 deletions pgtap/mincut/stoerWagner/compare_components.pg
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ SELECT * FROM pgr_stoerWagner(
)
$$
);
SELECT set_eq('stoerWagner5', 'stoerWagner6', '5: Mincut of edge 17');

PREPARE stoerWagner7 AS
SELECT *
Expand All @@ -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;

0 comments on commit 074647e

Please sign in to comment.