From 7b2c769a5d1126a5b3ba8540c46b686fbd6ed4b8 Mon Sep 17 00:00:00 2001 From: Jelte Fennema Date: Fri, 3 Jan 2020 12:09:50 +0100 Subject: [PATCH] Normalize tests: normalize file names for partitioned files --- src/test/regress/bin/normalize.sed | 8 ++++---- src/test/regress/expected/multi_multiuser.out | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/test/regress/bin/normalize.sed b/src/test/regress/bin/normalize.sed index 52f3a1360..1fd661817 100644 --- a/src/test/regress/bin/normalize.sed +++ b/src/test/regress/bin/normalize.sed @@ -52,10 +52,10 @@ s/ERROR: failed to execute task [0-9]+/ERROR: failed to execute task X/g # ignore WAL warnings /DEBUG: .+creating and filling new WAL file/d -# -## normalize file names for partitioned files -#s/(task_[0-9]+\.)[0-9]+/\1xxxx/g -#s/(job_[0-9]+\/task_[0-9]+\/p_[0-9]+\.)[0-9]+/\1xxxx/g + +# normalize file names for partitioned files +s/(task_[0-9]+\.)[0-9]+/\1xxxx/g +s/(job_[0-9]+\/task_[0-9]+\/p_[0-9]+\.)[0-9]+/\1xxxx/g # ## isolation_ref2ref_foreign_keys #s/"(ref_table_[0-9]_|ref_table_[0-9]_value_fkey_)[0-9]+"/"\1xxxxxxx"/g diff --git a/src/test/regress/expected/multi_multiuser.out b/src/test/regress/expected/multi_multiuser.out index 2fba5a6a2..b463eb05a 100644 --- a/src/test/regress/expected/multi_multiuser.out +++ b/src/test/regress/expected/multi_multiuser.out @@ -666,13 +666,13 @@ RESET ROLE; \c - - - :worker_2_port -- super user should not be able to copy files created by a user SELECT worker_fetch_partition_file(42, 1, 1, 1, 'localhost', :worker_1_port); -WARNING: could not open file "base/pgsql_job_cache/job_0042/task_000001/p_00001.10": No such file or directory +WARNING: could not open file "base/pgsql_job_cache/job_0042/task_000001/p_00001.xxxx": No such file or directory CONTEXT: while executing command on localhost:xxxxx ERROR: could not receive file "base/pgsql_job_cache/job_0042/task_000001/p_00001" from localhost:xxxxx -- different user should not be able to fetch partition file SET ROLE usage_access; SELECT worker_fetch_partition_file(42, 1, 1, 1, 'localhost', :worker_1_port); -WARNING: could not open file "base/pgsql_job_cache/job_0042/task_000001/p_00001.44518": No such file or directory +WARNING: could not open file "base/pgsql_job_cache/job_0042/task_000001/p_00001.xxxx": No such file or directory CONTEXT: while executing command on localhost:xxxxx ERROR: could not receive file "base/pgsql_job_cache/job_0042/task_000001/p_00001" from localhost:xxxxx -- only the user whom created the files should be able to fetch @@ -711,7 +711,7 @@ RESET ROLE; -- test that the super user is unable to read the contents of the intermediate file, -- although it does create the table SELECT worker_merge_files_into_table(42, 1, ARRAY['a'], ARRAY['integer']); -WARNING: Task file "task_000001.43115" does not have expected suffix ".10" +WARNING: Task file "task_000001.xxxx" does not have expected suffix ".10" worker_merge_files_into_table --------------------------------------------------------------------- @@ -753,7 +753,7 @@ SELECT worker_merge_files_and_run_query(42, 1, 'CREATE TABLE task_000001_merge(merge_column_0 int)', 'CREATE TABLE task_000001 (a) AS SELECT sum(merge_column_0) FROM task_000001_merge' ); -WARNING: Task file "task_000001.43115" does not have expected suffix ".10" +WARNING: Task file "task_000001.xxxx" does not have expected suffix ".10" worker_merge_files_and_run_query ---------------------------------------------------------------------