This is an automated email from the ASF dual-hosted git repository.
maxyang pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/cloudberry.git
The following commit(s) were added to refs/heads/main by this push:
new a7659f6de2a Fix some flaky test cases
a7659f6de2a is described below
commit a7659f6de2a5ef47454e604ddbb18ccc1946c9a5
Author: zhoujiaqi <[email protected]>
AuthorDate: Thu Jul 31 10:42:32 2025 +0800
Fix some flaky test cases
Two of flaky test case in CBDB have been fixed:
1. Test suites starting with `reindextable_while_reindex_idx`.
These tests fail not due to MVCC.
2. Scan + agg on `pg_class`. For the `pg_class` scans, either
an `Index Only scan` or a `Seq Scan` is acceptable.
---
src/test/isolation2/isolation2_schedule | 6 ++++--
src/test/regress/expected/aggregates.out | 4 ++++
src/test/regress/expected/aggregates_optimizer.out | 4 ++++
src/test/regress/sql/aggregates.sql | 4 ++++
4 files changed, 16 insertions(+), 2 deletions(-)
diff --git a/src/test/isolation2/isolation2_schedule
b/src/test/isolation2/isolation2_schedule
index f9e6082ff45..8931e46a5fc 100644
--- a/src/test/isolation2/isolation2_schedule
+++ b/src/test/isolation2/isolation2_schedule
@@ -267,8 +267,10 @@ test: reindex/reindextable_while_altertable_ao_part_btree
reindex/reindextable_w
# upstream also has this issue, so disable them for now
# test: reindex/reindextable_while_dropindex_ao_part_btree
reindex/reindextable_while_dropindex_heap_part_btree
reindex/reindextable_while_dropindex_aoco_part_btree
-test: reindex/reindextable_while_reindex_idx_ao_part_btree
reindex/reindextable_while_reindex_idx_heap_part_btree
reindex/reindextable_while_reindex_idx_aoco_part_btree
-test: reindex/reindextable_while_reindex_idx_ao_bitmap
reindex/reindextable_while_reindex_idx_heap_bitmap
reindex/reindextable_while_reindex_idx_aoco_bitmap
+# flaky tests: the tests prefixed with "reindextable_while_reindex_idx" may
failed, and the reason of failed is not related to MVCC.
+ignore: reindex/reindextable_while_reindex_idx_ao_part_btree
reindex/reindextable_while_reindex_idx_heap_part_btree
reindex/reindextable_while_reindex_idx_aoco_part_btree
+ignore: reindex/reindextable_while_reindex_idx_ao_bitmap
reindex/reindextable_while_reindex_idx_heap_bitmap
reindex/reindextable_while_reindex_idx_aoco_bitmap
+
test: reindex/serializable_reindex_with_drop_column_heap
test: reindex/serializable_reindex_with_drop_index_ao
reindex/serializable_reindex_with_drop_index_heap
test: reindex/repeatable_read_reindex_with_insert_heap
diff --git a/src/test/regress/expected/aggregates.out
b/src/test/regress/expected/aggregates.out
index f81478dabd4..91dba471eeb 100644
--- a/src/test/regress/expected/aggregates.out
+++ b/src/test/regress/expected/aggregates.out
@@ -3264,6 +3264,8 @@ drop table agg_hash_3;
drop table agg_hash_4;
-- GitHub issue https://github.com/greenplum-db/gpdb/issues/12061
-- numsegments of the general locus should be -1 on create_minmaxagg_path
+set enable_indexscan = off;
+set enable_indexonlyscan = off;
explain analyze select count(*) from pg_class, (select count(*) > 0 from
(select count(*) from pg_class where relnatts > 8) x) y;
QUERY PLAN
-----------------------------------------------------------------------------------------------------------------------
@@ -3279,6 +3281,8 @@ explain analyze select count(*) from pg_class, (select
count(*) > 0 from (select
Execution Time: 0.302 ms
(10 rows)
+reset enable_indexscan;
+reset enable_indexonlyscan;
-- test aggno
create table tgb1(v1 int, v2 int, v3 int);
NOTICE: Table doesn't have 'DISTRIBUTED BY' clause -- Using column named 'v1'
as the Apache Cloudberry data distribution key for this table.
diff --git a/src/test/regress/expected/aggregates_optimizer.out
b/src/test/regress/expected/aggregates_optimizer.out
index a840742448b..a832e48e940 100644
--- a/src/test/regress/expected/aggregates_optimizer.out
+++ b/src/test/regress/expected/aggregates_optimizer.out
@@ -3430,6 +3430,8 @@ drop table agg_hash_3;
drop table agg_hash_4;
-- GitHub issue https://github.com/greenplum-db/gpdb/issues/12061
-- numsegments of the general locus should be -1 on create_minmaxagg_path
+set enable_indexscan = off;
+set enable_indexonlyscan = off;
explain analyze select count(*) from pg_class, (select count(*) > 0 from
(select count(*) from pg_class where relnatts > 8) x) y;
INFO: GPORCA failed to produce a plan, falling back to Postgres-based planner
DETAIL: Falling back to Postgres-based planner because GPORCA does not
support the following feature: Queries on master-only tables
@@ -3448,6 +3450,8 @@ DETAIL: Falling back to Postgres-based planner because
GPORCA does not support
Execution Time: 0.198 ms
(11 rows)
+reset enable_indexscan;
+reset enable_indexonlyscan;
-- test aggno
create table tgb1(v1 int, v2 int, v3 int);
NOTICE: Table doesn't have 'DISTRIBUTED BY' clause -- Using column named 'v1'
as the Apache Cloudberry data distribution key for this table.
diff --git a/src/test/regress/sql/aggregates.sql
b/src/test/regress/sql/aggregates.sql
index 7229bbb6128..600ff0282e0 100644
--- a/src/test/regress/sql/aggregates.sql
+++ b/src/test/regress/sql/aggregates.sql
@@ -1446,7 +1446,11 @@ drop table agg_hash_4;
-- GitHub issue https://github.com/greenplum-db/gpdb/issues/12061
-- numsegments of the general locus should be -1 on create_minmaxagg_path
+set enable_indexscan = off;
+set enable_indexonlyscan = off;
explain analyze select count(*) from pg_class, (select count(*) > 0 from
(select count(*) from pg_class where relnatts > 8) x) y;
+reset enable_indexscan;
+reset enable_indexonlyscan;
-- test aggno
create table tgb1(v1 int, v2 int, v3 int);
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]