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:
|
||||
DO $$
|
||||
DECLARE
|
||||
v_node_id int;
|
||||
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
|
||||
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;
|
||||
|
|
|
@ -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_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
|
||||
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;
|
||||
|
|
Loading…
Reference in New Issue