mirror of https://github.com/citusdata/citus.git
Give details for exception message
parent
bb62b84ad7
commit
ed40dfe1a7
|
@ -81,9 +81,11 @@ s1: NOTICE: Node not found.
|
||||||
step s1-node-not-found:
|
step s1-node-not-found:
|
||||||
DO $$
|
DO $$
|
||||||
DECLARE
|
DECLARE
|
||||||
v_node_id int;
|
v_node_id int := -1;
|
||||||
v_node_exists boolean := true;
|
v_node_exists boolean := true;
|
||||||
v_count int := -1;
|
v_count int := -1;
|
||||||
|
v_exception_message text;
|
||||||
|
v_expected_exception_message text := '';
|
||||||
BEGIN
|
BEGIN
|
||||||
-- Get a node-id that does not exist in the cluster
|
-- Get a node-id that does not exist in the cluster
|
||||||
while v_node_exists loop
|
while v_node_exists loop
|
||||||
|
@ -99,7 +101,11 @@ DECLARE
|
||||||
select citus_pause_node(v_node_id);
|
select citus_pause_node(v_node_id);
|
||||||
EXCEPTION
|
EXCEPTION
|
||||||
WHEN SQLSTATE 'P0002' THEN
|
WHEN SQLSTATE 'P0002' THEN
|
||||||
|
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.';
|
RAISE NOTICE 'Node not found.';
|
||||||
|
end if;
|
||||||
END;
|
END;
|
||||||
$$
|
$$
|
||||||
LANGUAGE plpgsql;
|
LANGUAGE plpgsql;
|
||||||
|
|
|
@ -46,9 +46,11 @@ step "s1-node-not-found"
|
||||||
{
|
{
|
||||||
DO $$
|
DO $$
|
||||||
DECLARE
|
DECLARE
|
||||||
v_node_id int;
|
v_node_id int := -1;
|
||||||
v_node_exists boolean := true;
|
v_node_exists boolean := true;
|
||||||
v_count int := -1;
|
v_count int := -1;
|
||||||
|
v_exception_message text;
|
||||||
|
v_expected_exception_message text := '';
|
||||||
BEGIN
|
BEGIN
|
||||||
|
|
||||||
-- Get a node-id that does not exist in the cluster
|
-- Get a node-id that does not exist in the cluster
|
||||||
|
@ -68,7 +70,11 @@ step "s1-node-not-found"
|
||||||
|
|
||||||
EXCEPTION
|
EXCEPTION
|
||||||
WHEN SQLSTATE 'P0002' THEN
|
WHEN SQLSTATE 'P0002' THEN
|
||||||
|
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.';
|
RAISE NOTICE 'Node not found.';
|
||||||
|
end if;
|
||||||
END;
|
END;
|
||||||
$$
|
$$
|
||||||
LANGUAGE plpgsql;
|
LANGUAGE plpgsql;
|
||||||
|
|
Loading…
Reference in New Issue