diff --git a/src/test/regress/expected/isolation_citus_pause_node.out b/src/test/regress/expected/isolation_citus_pause_node.out index ad2213bf4..85e03b232 100644 --- a/src/test/regress/expected/isolation_citus_pause_node.out +++ b/src/test/regress/expected/isolation_citus_pause_node.out @@ -77,13 +77,15 @@ starting permutation: s1-begin s1-node-not-found s1-end step s1-begin: BEGIN; -s1: NOTICE: Node not found. +s1: NOTICE: Node not found. step s1-node-not-found: DO $$ DECLARE - v_node_id int; - v_node_exists boolean := true; - v_count int :=-1; + v_node_id int := -1; + v_node_exists boolean := true; + v_count int := -1; + v_exception_message text; + v_expected_exception_message text := ''; BEGIN -- Get a node-id that does not exist in the cluster while v_node_exists loop @@ -99,7 +101,11 @@ DECLARE select citus_pause_node(v_node_id); EXCEPTION WHEN SQLSTATE 'P0002' THEN - RAISE NOTICE 'Node not found.'; + GET STACKED DIAGNOSTICS v_exception_message = MESSAGE_TEXT; + v_expected_exception_message := 'node ' || v_node_id || ' not found'; + if v_exception_message = v_expected_exception_message then + RAISE NOTICE 'Node not found.'; + end if; END; $$ LANGUAGE plpgsql; diff --git a/src/test/regress/spec/isolation_citus_pause_node.spec b/src/test/regress/spec/isolation_citus_pause_node.spec index 6a9fc9bbb..a25e3d2c2 100644 --- a/src/test/regress/spec/isolation_citus_pause_node.spec +++ b/src/test/regress/spec/isolation_citus_pause_node.spec @@ -46,9 +46,11 @@ step "s1-node-not-found" { DO $$ DECLARE - v_node_id int; + v_node_id int := -1; v_node_exists boolean := true; - v_count int :=-1; + v_count int := -1; + v_exception_message text; + v_expected_exception_message text := ''; BEGIN -- Get a node-id that does not exist in the cluster @@ -68,7 +70,11 @@ step "s1-node-not-found" EXCEPTION WHEN SQLSTATE 'P0002' THEN - RAISE NOTICE 'Node not found.'; + GET STACKED DIAGNOSTICS v_exception_message = MESSAGE_TEXT; + v_expected_exception_message := 'node ' || v_node_id || ' not found'; + if v_exception_message = v_expected_exception_message then + RAISE NOTICE 'Node not found.'; + end if; END; $$ LANGUAGE plpgsql;