mirror of https://github.com/citusdata/citus.git
Fix tests
parent
4fb2b80f3a
commit
beaf692c43
|
@ -313,7 +313,13 @@ SELECT create_reference_table('ref_table');
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
-- add a new node to trigger replicate_reference_tables task
|
-- add a new node to trigger replicate_reference_tables task
|
||||||
SELECT 1 FROM citus_add_node('localhost', :worker_3_port);
|
SELECT 1 FROM citus_set_coordinator_host('localhost');
|
||||||
|
?column?
|
||||||
|
---------------------------------------------------------------------
|
||||||
|
1
|
||||||
|
(1 row)
|
||||||
|
|
||||||
|
SELECT 1 FROM master_set_node_property('localhost', :master_port, 'shouldhaveshards', true);
|
||||||
?column?
|
?column?
|
||||||
---------------------------------------------------------------------
|
---------------------------------------------------------------------
|
||||||
1
|
1
|
||||||
|
@ -343,22 +349,12 @@ SELECT state, details from citus_rebalance_status();
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
RESET ROLE;
|
RESET ROLE;
|
||||||
-- reset the the number of nodes by removing the previously added node
|
|
||||||
SELECT 1 FROM citus_drain_node('localhost', :worker_3_port);
|
|
||||||
NOTICE: Moving shard xxxxx from localhost:xxxxx to localhost:xxxxx ...
|
|
||||||
?column?
|
|
||||||
---------------------------------------------------------------------
|
|
||||||
1
|
|
||||||
(1 row)
|
|
||||||
|
|
||||||
CALL citus_cleanup_orphaned_resources();
|
|
||||||
NOTICE: cleaned up 1 orphaned resources
|
|
||||||
SELECT 1 FROM citus_remove_node('localhost', :worker_3_port);
|
|
||||||
?column?
|
|
||||||
---------------------------------------------------------------------
|
|
||||||
1
|
|
||||||
(1 row)
|
|
||||||
|
|
||||||
SET client_min_messages TO WARNING;
|
SET client_min_messages TO WARNING;
|
||||||
DROP SCHEMA background_rebalance CASCADE;
|
DROP SCHEMA background_rebalance CASCADE;
|
||||||
DROP USER non_super_user_rebalance;
|
DROP USER non_super_user_rebalance;
|
||||||
|
SELECT 1 FROM citus_remove_node('localhost', :master_port);
|
||||||
|
?column?
|
||||||
|
---------------------------------------------------------------------
|
||||||
|
1
|
||||||
|
(1 row)
|
||||||
|
|
||||||
|
|
|
@ -113,7 +113,8 @@ CREATE TABLE ref_table(a int primary key);
|
||||||
SELECT create_reference_table('ref_table');
|
SELECT create_reference_table('ref_table');
|
||||||
|
|
||||||
-- add a new node to trigger replicate_reference_tables task
|
-- add a new node to trigger replicate_reference_tables task
|
||||||
SELECT 1 FROM citus_add_node('localhost', :worker_3_port);
|
SELECT 1 FROM citus_set_coordinator_host('localhost');
|
||||||
|
SELECT 1 FROM master_set_node_property('localhost', :master_port, 'shouldhaveshards', true);
|
||||||
|
|
||||||
SET ROLE non_super_user_rebalance;
|
SET ROLE non_super_user_rebalance;
|
||||||
SELECT 1 FROM citus_rebalance_start(shard_transfer_mode := 'force_logical');
|
SELECT 1 FROM citus_rebalance_start(shard_transfer_mode := 'force_logical');
|
||||||
|
@ -124,11 +125,7 @@ SELECT state, details from citus_rebalance_status();
|
||||||
|
|
||||||
RESET ROLE;
|
RESET ROLE;
|
||||||
|
|
||||||
-- reset the the number of nodes by removing the previously added node
|
|
||||||
SELECT 1 FROM citus_drain_node('localhost', :worker_3_port);
|
|
||||||
CALL citus_cleanup_orphaned_resources();
|
|
||||||
SELECT 1 FROM citus_remove_node('localhost', :worker_3_port);
|
|
||||||
|
|
||||||
SET client_min_messages TO WARNING;
|
SET client_min_messages TO WARNING;
|
||||||
DROP SCHEMA background_rebalance CASCADE;
|
DROP SCHEMA background_rebalance CASCADE;
|
||||||
DROP USER non_super_user_rebalance;
|
DROP USER non_super_user_rebalance;
|
||||||
|
SELECT 1 FROM citus_remove_node('localhost', :master_port);
|
||||||
|
|
Loading…
Reference in New Issue