mirror of https://github.com/citusdata/citus.git
Description: Fix failures of tests on recent postgres builds
In recent postgres builds you cannot set client_min_messages to values higher then ERROR, if will silently set it to ERROR if so. During some tests we would set it to fatal to hide random values (eg. pid's of processes) from the test output. This patch will use different tactics for hiding these values.release-7.4
parent
5a7e4d8a57
commit
3abb5e5715
|
@ -9,3 +9,6 @@
|
||||||
# Regression test output
|
# Regression test output
|
||||||
/regression.diffs
|
/regression.diffs
|
||||||
/regression.out
|
/regression.out
|
||||||
|
|
||||||
|
# Failure test side effets
|
||||||
|
/proxy.output
|
||||||
|
|
|
@ -225,8 +225,12 @@ ERROR: parameter "citus.max_task_string_size" cannot be changed without restart
|
||||||
-- error message may vary between executions
|
-- error message may vary between executions
|
||||||
-- hiding warning and error message
|
-- hiding warning and error message
|
||||||
-- no output means the query has failed
|
-- no output means the query has failed
|
||||||
SET client_min_messages to FATAL;
|
SET client_min_messages to ERROR;
|
||||||
|
SELECT raise_failed_execution('
|
||||||
SELECT u.* FROM wide_table u JOIN wide_table v ON (u.long_column_002 = v.long_column_003);
|
SELECT u.* FROM wide_table u JOIN wide_table v ON (u.long_column_002 = v.long_column_003);
|
||||||
|
');
|
||||||
|
ERROR: Task failed to execute
|
||||||
|
CONTEXT: PL/pgSQL function raise_failed_execution(text) line 6 at RAISE
|
||||||
-- following will succeed since it fetches few columns
|
-- following will succeed since it fetches few columns
|
||||||
SELECT u.long_column_001, u.long_column_002, u.long_column_003 FROM wide_table u JOIN wide_table v ON (u.long_column_002 = v.long_column_003);
|
SELECT u.long_column_001, u.long_column_002, u.long_column_003 FROM wide_table u JOIN wide_table v ON (u.long_column_002 = v.long_column_003);
|
||||||
long_column_001 | long_column_002 | long_column_003
|
long_column_001 | long_column_002 | long_column_003
|
||||||
|
|
|
@ -84,3 +84,13 @@ $desc_views$
|
||||||
|
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
|
-- Create a function to make sure that queries returning the same result
|
||||||
|
CREATE FUNCTION raise_failed_execution(query text) RETURNS void AS $$
|
||||||
|
BEGIN
|
||||||
|
EXECUTE query;
|
||||||
|
EXCEPTION WHEN OTHERS THEN
|
||||||
|
IF SQLERRM LIKE 'failed to execute task%' THEN
|
||||||
|
RAISE 'Task failed to execute';
|
||||||
|
END IF;
|
||||||
|
END;
|
||||||
|
$$LANGUAGE plpgsql;
|
||||||
|
|
|
@ -220,9 +220,11 @@ SET citus.max_task_string_size TO 20000;
|
||||||
-- error message may vary between executions
|
-- error message may vary between executions
|
||||||
-- hiding warning and error message
|
-- hiding warning and error message
|
||||||
-- no output means the query has failed
|
-- no output means the query has failed
|
||||||
SET client_min_messages to FATAL;
|
SET client_min_messages to ERROR;
|
||||||
|
|
||||||
|
SELECT raise_failed_execution('
|
||||||
SELECT u.* FROM wide_table u JOIN wide_table v ON (u.long_column_002 = v.long_column_003);
|
SELECT u.* FROM wide_table u JOIN wide_table v ON (u.long_column_002 = v.long_column_003);
|
||||||
|
');
|
||||||
|
|
||||||
-- following will succeed since it fetches few columns
|
-- following will succeed since it fetches few columns
|
||||||
SELECT u.long_column_001, u.long_column_002, u.long_column_003 FROM wide_table u JOIN wide_table v ON (u.long_column_002 = v.long_column_003);
|
SELECT u.long_column_001, u.long_column_002, u.long_column_003 FROM wide_table u JOIN wide_table v ON (u.long_column_002 = v.long_column_003);
|
||||||
|
|
|
@ -81,3 +81,14 @@ WHERE cc.constraint_schema = ccu.constraint_schema AND
|
||||||
ORDER BY cc.constraint_name ASC;
|
ORDER BY cc.constraint_name ASC;
|
||||||
$desc_views$
|
$desc_views$
|
||||||
);
|
);
|
||||||
|
|
||||||
|
-- Create a function to make sure that queries returning the same result
|
||||||
|
CREATE FUNCTION raise_failed_execution(query text) RETURNS void AS $$
|
||||||
|
BEGIN
|
||||||
|
EXECUTE query;
|
||||||
|
EXCEPTION WHEN OTHERS THEN
|
||||||
|
IF SQLERRM LIKE 'failed to execute task%' THEN
|
||||||
|
RAISE 'Task failed to execute';
|
||||||
|
END IF;
|
||||||
|
END;
|
||||||
|
$$LANGUAGE plpgsql;
|
||||||
|
|
Loading…
Reference in New Issue