From c092968f0dd4decce1e7c1b02245089d7ad27b2a Mon Sep 17 00:00:00 2001 From: Burak Velioglu Date: Tue, 18 Jan 2022 00:07:16 +0300 Subject: [PATCH] Fix tests --- .../isolation_distributed_transaction_id.out | 5 ++++- ...on_replicate_reference_tables_to_coordinator.out | 13 ++++--------- src/test/regress/input/multi_copy.source | 5 ----- .../spec/isolation_distributed_transaction_id.spec | 2 +- 4 files changed, 9 insertions(+), 16 deletions(-) diff --git a/src/test/regress/expected/isolation_distributed_transaction_id.out b/src/test/regress/expected/isolation_distributed_transaction_id.out index 3dd129ad8..e813ab4de 100644 --- a/src/test/regress/expected/isolation_distributed_transaction_id.out +++ b/src/test/regress/expected/isolation_distributed_transaction_id.out @@ -68,7 +68,7 @@ step s3-commit: COMMIT; -starting permutation: s1-create-table s1-begin s1-insert s1-verify-current-xact-is-on-worker s1-commit +starting permutation: s1-create-table s1-begin s1-insert s1-verify-current-xact-is-on-worker s1-drop-table s1-commit step s1-create-table: -- some tests also use distributed table CREATE TABLE distributed_transaction_id_table(some_value int, other_value int); @@ -104,6 +104,9 @@ nodeport|xact_exists 57638|t (2 rows) +step s1-drop-table: + DROP TABLE distributed_transaction_id_table; + step s1-commit: COMMIT; diff --git a/src/test/regress/expected/isolation_replicate_reference_tables_to_coordinator.out b/src/test/regress/expected/isolation_replicate_reference_tables_to_coordinator.out index c416e62d6..675e09994 100644 --- a/src/test/regress/expected/isolation_replicate_reference_tables_to_coordinator.out +++ b/src/test/regress/expected/isolation_replicate_reference_tables_to_coordinator.out @@ -90,10 +90,7 @@ query |query_hostname |query_hostport|distribute update ref_table set a = a + 1; |coordinator_host| 57636|coordinator_host | 57636|idle in transaction|Client |ClientRead|postgres|regression - - update ref_table set a = a + 1; -|localhost | 57636|coordinator_host | 57636|idle in transaction|Client |ClientRead|postgres|regression -(2 rows) +(1 row) step s2-view-worker: SELECT query, query_hostname, query_hostport, distributed_query_host_name, @@ -108,9 +105,7 @@ query |q --------------------------------------------------------------------- UPDATE public.ref_table_1500775 ref_table SET a = (a OPERATOR(pg_catalog.+) 1)|localhost | 57638|coordinator_host | 57636|idle in transaction|Client |ClientRead|postgres|regression UPDATE public.ref_table_1500775 ref_table SET a = (a OPERATOR(pg_catalog.+) 1)|localhost | 57637|coordinator_host | 57636|idle in transaction|Client |ClientRead|postgres|regression -UPDATE public.ref_table_1500775 ref_table SET a = (a OPERATOR(pg_catalog.+) 1)|coordinator_host| 57636|coordinator_host | 57636|idle in transaction|Client |ClientRead|postgres|regression -UPDATE public.ref_table_1500775 ref_table SET a = (a OPERATOR(pg_catalog.+) 1)|localhost | 57636|coordinator_host | 57636|idle in transaction|Client |ClientRead|postgres|regression -(4 rows) +(2 rows) step s2-end: END; @@ -146,12 +141,12 @@ step s2-active-transactions: count --------------------------------------------------------------------- - 2 + 1 (1 row) count --------------------------------------------------------------------- - 6 + 3 (1 row) step s1-end: diff --git a/src/test/regress/input/multi_copy.source b/src/test/regress/input/multi_copy.source index 29750a1f9..b40cdd2d5 100644 --- a/src/test/regress/input/multi_copy.source +++ b/src/test/regress/input/multi_copy.source @@ -497,12 +497,7 @@ SELECT shardid, nodename, nodeport WHERE logicalrelid = 'numbers_append'::regclass order by placementid; -- add the node back -SET citus.log_remote_commands to true; -SET citus.worker_min_messages to debug4; -set client_min_messages to debug4; SELECT 1 FROM master_activate_node('localhost', :worker_1_port); -reset citus.log_remote_commands; -reset citus.worker_min_messages; RESET client_min_messages; RESET citus.shard_replication_factor; -- add two new shards and verify they are created at both workers diff --git a/src/test/regress/spec/isolation_distributed_transaction_id.spec b/src/test/regress/spec/isolation_distributed_transaction_id.spec index 1f73d74dd..372cd8f78 100644 --- a/src/test/regress/spec/isolation_distributed_transaction_id.spec +++ b/src/test/regress/spec/isolation_distributed_transaction_id.spec @@ -124,7 +124,7 @@ permutation "s1-begin" "s1-assign-transaction-id" "s1-get-all-transactions" "s2- // now show that distributed transaction id on the coordinator // is the same with the one on the worker -permutation "s1-create-table" "s1-begin" "s1-insert" "s1-verify-current-xact-is-on-worker" "s1-commit" "s1-drop-table" +permutation "s1-create-table" "s1-begin" "s1-insert" "s1-verify-current-xact-is-on-worker" "s1-drop-table" "s1-commit" // we would initially forget the distributed transaction ID on pg_dist_partition invalidations permutation "s1-begin" "s1-assign-transaction-id" "s1-has-transaction-number" "s2-vacuum" "s1-has-transaction-number" "s1-commit"