Run select_parallel test by itself
authorPeter Eisentraut <peter_e@gmx.net>
Mon, 22 Aug 2016 16:00:00 +0000 (12:00 -0400)
committerPeter Eisentraut <peter_e@gmx.net>
Mon, 22 Aug 2016 16:00:00 +0000 (12:00 -0400)
Remove the plpgsql wrapping that hides the context.  So now the test
will fail if the work doesn't actually happen in a parallel worker.  Run
the test in its own test group to ensure it won't run out of resources
for that.

src/test/regress/expected/select_parallel.out
src/test/regress/parallel_schedule
src/test/regress/sql/select_parallel.sql

index 2286fafab399f72397440f82d8fff7a85a37ad5e..18e21b7f1325443ba18a603d5024fe5765dda509 100644 (file)
@@ -111,14 +111,8 @@ explain (costs off)
          Index Cond: (unique1 = 1)
 (5 rows)
 
-do $$begin
-  -- Provoke error, possibly in worker.  If this error happens to occur in
-  -- the worker, there will be a CONTEXT line which must be hidden.
-  perform stringu1::int2 from tenk1 where unique1 = 1;
-  exception
-       when others then
-               raise 'SQLERRM: %', sqlerrm;
-end$$;
-ERROR:  SQLERRM: invalid input syntax for integer: "BAAAAA"
-CONTEXT:  PL/pgSQL function inline_code_block line 7 at RAISE
+-- provoke error in worker
+select stringu1::int2 from tenk1 where unique1 = 1;
+ERROR:  invalid input syntax for integer: "BAAAAA"
+CONTEXT:  parallel worker
 rollback;
index 3815182fe7a8b14b3d89bd0d052ddc342aeb9939..1cb5dfc336d36e28a7b828e86738eb56cd9fe0f6 100644 (file)
@@ -92,7 +92,10 @@ test: brin gin gist spgist privileges init_privs security_label collate matview
 test: alter_generic alter_operator misc psql async dbsize misc_functions
 
 # rules cannot run concurrently with any test that creates a view
-test: rules psql_crosstab select_parallel amutils
+test: rules psql_crosstab amutils
+
+# run by itself so it can run parallel workers
+test: select_parallel
 
 # ----------
 # Another group of parallel tests
index 38d3166742c950c1357505314e93d30f67e7b5e5..8b4090f2ec18ea7c94998cb3425da300069820b0 100644 (file)
@@ -44,13 +44,7 @@ set force_parallel_mode=1;
 explain (costs off)
   select stringu1::int2 from tenk1 where unique1 = 1;
 
-do $$begin
-  -- Provoke error, possibly in worker.  If this error happens to occur in
-  -- the worker, there will be a CONTEXT line which must be hidden.
-  perform stringu1::int2 from tenk1 where unique1 = 1;
-  exception
-       when others then
-               raise 'SQLERRM: %', sqlerrm;
-end$$;
+-- provoke error in worker
+select stringu1::int2 from tenk1 where unique1 = 1;
 
 rollback;