You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudberry.apache.org by yj...@apache.org on 2024/12/18 00:38:42 UTC
(cloudberry) 06/08: Fix flaky testcase correlated_subquery
This is an automated email from the ASF dual-hosted git repository.
yjhjstz pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/cloudberry.git
commit a6b319cb4d424abe6cba0e8f6ff6d8f1700f3ecc
Author: David Kimura <dk...@vmware.com>
AuthorDate: Wed Mar 23 18:33:30 2022 +0000
Fix flaky testcase correlated_subquery
Issue is that commit fd9e35bbeab added CREATE CAST ... IMPLICIT to the
test which does not play nicely with some tests (e.g. qp_gist_indexes4).
Fix this by testing cast relevant section inside a transation and
rolling back afterwards.
---
src/test/regress/expected/correlated_subquery.out | 5 ++++-
src/test/regress/sql/correlated_subquery.sql | 5 ++++-
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/src/test/regress/expected/correlated_subquery.out b/src/test/regress/expected/correlated_subquery.out
index 2a38fde4d3..4ddac94019 100644
--- a/src/test/regress/expected/correlated_subquery.out
+++ b/src/test/regress/expected/correlated_subquery.out
@@ -121,6 +121,9 @@ SELECT (SELECT a FROM correlated_subquery_test LIMIT 1)=ALL(SELECT a FROM correl
t
(1 row)
+-- Use a transaction because following CREATE CAST doesn't necessarily play
+-- nicely with other tests.
+BEGIN;
CREATE CAST (integer AS text) WITH INOUT AS IMPLICIT;
SELECT (SELECT b FROM correlated_subquery_test LIMIT 1)=ALL(SELECT a FROM correlated_subquery_test);
?column?
@@ -128,4 +131,4 @@ SELECT (SELECT b FROM correlated_subquery_test LIMIT 1)=ALL(SELECT a FROM correl
t
(1 row)
-DROP CAST (integer AS text);
+ROLLBACK;
diff --git a/src/test/regress/sql/correlated_subquery.sql b/src/test/regress/sql/correlated_subquery.sql
index 4d33cef756..bba5416788 100644
--- a/src/test/regress/sql/correlated_subquery.sql
+++ b/src/test/regress/sql/correlated_subquery.sql
@@ -24,6 +24,9 @@ CREATE TABLE correlated_subquery_test(
b int
);
SELECT (SELECT a FROM correlated_subquery_test LIMIT 1)=ALL(SELECT a FROM correlated_subquery_test);
+-- Use a transaction because following CREATE CAST doesn't necessarily play
+-- nicely with other tests.
+BEGIN;
CREATE CAST (integer AS text) WITH INOUT AS IMPLICIT;
SELECT (SELECT b FROM correlated_subquery_test LIMIT 1)=ALL(SELECT a FROM correlated_subquery_test);
-DROP CAST (integer AS text);
+ROLLBACK;
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cloudberry.apache.org
For additional commands, e-mail: commits-help@cloudberry.apache.org