Fixes flaky tests

pull/7563/head
gurkanindibay 2024-03-26 16:30:55 +03:00
parent aaa1030157
commit 3b6236bd1c
16 changed files with 52 additions and 12 deletions

View File

@ -4,7 +4,6 @@
test: enable_ddl_propagation test: enable_ddl_propagation
test: multi_test_helpers multi_test_helpers_superuser multi_create_fdw columnar_test_helpers failure_test_helpers test: multi_test_helpers multi_test_helpers_superuser multi_create_fdw columnar_test_helpers failure_test_helpers
test: multi_cluster_management test: multi_cluster_management
test: enable_ddl_propagation
test: multi_test_catalog_views test: multi_test_catalog_views
test: multi_create_table test: multi_create_table
test: multi_behavioral_analytics_create_table test: multi_behavioral_analytics_create_table

View File

@ -422,7 +422,17 @@ def find_test_schedule_and_line(test_name, args):
def test_dependencies(test_name, test_schedule, schedule_line, args): def test_dependencies(test_name, test_schedule, schedule_line, args):
if test_name in DEPS: if test_name in DEPS:
return DEPS[test_name] # since enable_ddl_propagation is a must to execute tests
# below block adds enable_ddl_propagation as a dependency
# as the first element of extra tests if schedule is not configured
test_deps = DEPS[test_name]
ddl_propagation_test = "isolation_enable_ddl_propagation" if test_name.startswith("isolation") else "enable_ddl_propagation"
if test_deps is not None and test_deps.schedule is None:
test_deps.direct_extra_tests = [ddl_propagation_test] + test_deps.direct_extra_tests
return test_deps
else:
return DEPS[test_name]
if "citus_upgrade" in test_schedule: if "citus_upgrade" in test_schedule:
return TestDeps(None, citus_upgrade_infra=True) return TestDeps(None, citus_upgrade_infra=True)

View File

@ -1,7 +1,6 @@
test: enable_ddl_propagation test: enable_ddl_propagation
test: multi_test_helpers multi_test_helpers_superuser columnar_test_helpers test: multi_test_helpers multi_test_helpers_superuser columnar_test_helpers
test: multi_cluster_management test: multi_cluster_management
test: enable_ddl_propagation
test: multi_test_catalog_views test: multi_test_catalog_views
test: remove_coordinator_from_metadata test: remove_coordinator_from_metadata

View File

@ -1,3 +1,4 @@
test: enable_ddl_propagation
test: single_node_enterprise test: single_node_enterprise
test: multi_test_helpers multi_test_helpers_superuser test: multi_test_helpers multi_test_helpers_superuser
test: multi_cluster_management test: multi_cluster_management

View File

@ -5,7 +5,6 @@ test: single_node_enterprise
test: multi_test_helpers multi_test_helpers_superuser test: multi_test_helpers multi_test_helpers_superuser
test: multi_cluster_management test: multi_cluster_management
test: enable_ddl_propagation
test: multi_test_catalog_views test: multi_test_catalog_views
test: multi_data_types test: multi_data_types
test: multi_tenant_isolation test: multi_tenant_isolation

View File

@ -69,3 +69,20 @@ DROP TABLE test_dist;
ALTER SEQUENCE pg_catalog.pg_dist_node_nodeid_seq RESTART 30; ALTER SEQUENCE pg_catalog.pg_dist_node_nodeid_seq RESTART 30;
ALTER SEQUENCE pg_catalog.pg_dist_groupid_seq RESTART 18; ALTER SEQUENCE pg_catalog.pg_dist_groupid_seq RESTART 18;
ALTER SEQUENCE pg_catalog.pg_dist_placement_placementid_seq RESTART 83; ALTER SEQUENCE pg_catalog.pg_dist_placement_placementid_seq RESTART 83;
-- Enable ddl sync in all nodes
SELECT result from run_command_on_all_nodes('ALTER SYSTEM SET citus.enable_ddl_propagation TO ON');
result
---------------------------------------------------------------------
ALTER SYSTEM
ALTER SYSTEM
ALTER SYSTEM
(3 rows)
SELECT result from run_command_on_all_nodes('SELECT pg_reload_conf()');
result
---------------------------------------------------------------------
t
t
t
(3 rows)

View File

@ -1264,3 +1264,20 @@ SELECT bool_and(hasmetadata) AND bool_and(metadatasynced) FROM pg_dist_node WHER
-- keep permissions compatible accross versions, in regression -- keep permissions compatible accross versions, in regression
-- tests. -- tests.
GRANT ALL ON SCHEMA public TO PUBLIC; GRANT ALL ON SCHEMA public TO PUBLIC;
-- Enable ddl sync in all nodes
SELECT result from run_command_on_all_nodes('ALTER SYSTEM SET citus.enable_ddl_propagation TO ON');
result
---------------------------------------------------------------------
ALTER SYSTEM
ALTER SYSTEM
ALTER SYSTEM
(3 rows)
SELECT result from run_command_on_all_nodes('SELECT pg_reload_conf()');
result
---------------------------------------------------------------------
t
t
t
(3 rows)

View File

@ -1,4 +1,3 @@
test: enable_ddl_propagation test: enable_ddl_propagation
test: minimal_cluster_management test: minimal_cluster_management
test: enable_ddl_propagation
test: multi_test_helpers multi_test_helpers_superuser multi_create_fdw columnar_test_helpers multi_test_catalog_views tablespace test: multi_test_helpers multi_test_helpers_superuser multi_create_fdw columnar_test_helpers multi_test_catalog_views tablespace

View File

@ -22,7 +22,6 @@ test: single_node
test: relation_access_tracking_single_node test: relation_access_tracking_single_node
test: single_node_truncate test: single_node_truncate
test: multi_cluster_management test: multi_cluster_management
test: enable_ddl_propagation
# below tests are placed right after multi_cluster_management as we do # below tests are placed right after multi_cluster_management as we do
# remove/add node operations and we do not want any preexisting objects # remove/add node operations and we do not want any preexisting objects

View File

@ -18,8 +18,6 @@ test: multi_extension
test: multi_test_helpers multi_test_helpers_superuser test: multi_test_helpers multi_test_helpers_superuser
test: multi_mx_node_metadata test: multi_mx_node_metadata
test: multi_cluster_management test: multi_cluster_management
test: enable_ddl_propagation
test: remove_coordinator_from_metadata test: remove_coordinator_from_metadata
test: multi_mx_function_table_reference test: multi_mx_function_table_reference
test: multi_test_catalog_views test: multi_test_catalog_views

View File

@ -1,7 +1,6 @@
test: enable_ddl_propagation test: enable_ddl_propagation
test: multi_test_helpers multi_test_helpers_superuser test: multi_test_helpers multi_test_helpers_superuser
test: multi_cluster_management test: multi_cluster_management
test: enable_ddl_propagation
test: create_role_propagation test: create_role_propagation
test: pg16 test: pg16
test: multi_create_fdw test: multi_create_fdw

View File

@ -4,7 +4,6 @@
test: enable_ddl_propagation test: enable_ddl_propagation
test: multi_test_helpers multi_test_helpers_superuser test: multi_test_helpers multi_test_helpers_superuser
test: multi_cluster_management test: multi_cluster_management
test: enable_ddl_propagation
test: multi_mx_function_table_reference test: multi_mx_function_table_reference
test: multi_test_catalog_views test: multi_test_catalog_views

View File

@ -1,7 +1,6 @@
test: enable_ddl_propagation test: enable_ddl_propagation
test: multi_test_helpers multi_test_helpers_superuser test: multi_test_helpers multi_test_helpers_superuser
test: multi_cluster_management test: multi_cluster_management
test: enable_ddl_propagation
test: multi_test_catalog_views test: multi_test_catalog_views
test: worker_copy_table_to_node test: worker_copy_table_to_node
test: shard_rebalancer_unit test: shard_rebalancer_unit

View File

@ -3,7 +3,6 @@
test: enable_ddl_propagation test: enable_ddl_propagation
test: multi_test_helpers multi_test_helpers_superuser columnar_test_helpers test: multi_test_helpers multi_test_helpers_superuser columnar_test_helpers
test: multi_cluster_management test: multi_cluster_management
test: enable_ddl_propagation
test: remove_coordinator_from_metadata test: remove_coordinator_from_metadata
test: multi_test_catalog_views test: multi_test_catalog_views
test: tablespace test: tablespace

View File

@ -41,3 +41,6 @@ DROP TABLE test_dist;
ALTER SEQUENCE pg_catalog.pg_dist_node_nodeid_seq RESTART 30; ALTER SEQUENCE pg_catalog.pg_dist_node_nodeid_seq RESTART 30;
ALTER SEQUENCE pg_catalog.pg_dist_groupid_seq RESTART 18; ALTER SEQUENCE pg_catalog.pg_dist_groupid_seq RESTART 18;
ALTER SEQUENCE pg_catalog.pg_dist_placement_placementid_seq RESTART 83; ALTER SEQUENCE pg_catalog.pg_dist_placement_placementid_seq RESTART 83;
-- Enable ddl sync in all nodes
SELECT result from run_command_on_all_nodes('ALTER SYSTEM SET citus.enable_ddl_propagation TO ON');
SELECT result from run_command_on_all_nodes('SELECT pg_reload_conf()');

View File

@ -537,3 +537,6 @@ SELECT bool_and(hasmetadata) AND bool_and(metadatasynced) FROM pg_dist_node WHER
-- keep permissions compatible accross versions, in regression -- keep permissions compatible accross versions, in regression
-- tests. -- tests.
GRANT ALL ON SCHEMA public TO PUBLIC; GRANT ALL ON SCHEMA public TO PUBLIC;
-- Enable ddl sync in all nodes
SELECT result from run_command_on_all_nodes('ALTER SYSTEM SET citus.enable_ddl_propagation TO ON');
SELECT result from run_command_on_all_nodes('SELECT pg_reload_conf()');