mirror of https://github.com/citusdata/citus.git
Fix operation tests
parent
6de2d7f050
commit
0cfe2375b6
|
@ -142,7 +142,6 @@ SELECT master_move_shard_placement(20000000, 'localhost', :worker_2_port, 'local
|
|||
|
||||
(1 row)
|
||||
|
||||
SELECT run_command_on_workers($cmd$
|
||||
-- override the function for testing purpose
|
||||
create or replace function pg_catalog.citus_local_disk_space_stats(OUT available_disk_size bigint, OUT total_disk_size bigint)
|
||||
as $BODY$
|
||||
|
@ -151,13 +150,6 @@ SELECT run_command_on_workers($cmd$
|
|||
select 8500 into total_disk_size;
|
||||
end
|
||||
$BODY$ language plpgsql;
|
||||
$cmd$);
|
||||
run_command_on_workers
|
||||
---------------------------------------------------------------------
|
||||
(localhost,57637,t,"CREATE FUNCTION")
|
||||
(localhost,57638,t,"CREATE FUNCTION")
|
||||
(2 rows)
|
||||
|
||||
SELECT citus_shard_cost_by_disk_size(20000001);
|
||||
citus_shard_cost_by_disk_size
|
||||
---------------------------------------------------------------------
|
||||
|
@ -187,7 +179,6 @@ $cmd$);
|
|||
(localhost,57638,t,1)
|
||||
(2 rows)
|
||||
|
||||
SELECT run_command_on_workers($cmd$
|
||||
-- override the function for testing purpose
|
||||
create or replace function pg_catalog.citus_local_disk_space_stats(OUT available_disk_size bigint, OUT total_disk_size bigint)
|
||||
as $BODY$
|
||||
|
@ -196,13 +187,6 @@ SELECT run_command_on_workers($cmd$
|
|||
select 8500 into total_disk_size;
|
||||
end
|
||||
$BODY$ language plpgsql;
|
||||
$cmd$);
|
||||
run_command_on_workers
|
||||
---------------------------------------------------------------------
|
||||
(localhost,57637,t,"CREATE FUNCTION")
|
||||
(localhost,57638,t,"CREATE FUNCTION")
|
||||
(2 rows)
|
||||
|
||||
-- When there would not be enough free space left after the move, the move should fail
|
||||
SELECT master_move_shard_placement(20000001, 'localhost', :worker_2_port, 'localhost', :worker_1_port);
|
||||
ERROR: not enough empty space on node if the shard is moved, actual available space after move will be 108 bytes, desired available space after move is 850 bytes,estimated size increase on node after move is 8192 bytes.
|
||||
|
|
|
@ -80,7 +80,6 @@ $cmd$);
|
|||
SELECT master_move_shard_placement(20000000, 'localhost', :worker_2_port, 'localhost', :worker_1_port);
|
||||
|
||||
|
||||
SELECT run_command_on_workers($cmd$
|
||||
-- override the function for testing purpose
|
||||
create or replace function pg_catalog.citus_local_disk_space_stats(OUT available_disk_size bigint, OUT total_disk_size bigint)
|
||||
as $BODY$
|
||||
|
@ -89,8 +88,6 @@ SELECT run_command_on_workers($cmd$
|
|||
select 8500 into total_disk_size;
|
||||
end
|
||||
$BODY$ language plpgsql;
|
||||
$cmd$);
|
||||
|
||||
|
||||
SELECT citus_shard_cost_by_disk_size(20000001);
|
||||
|
||||
|
@ -108,7 +105,6 @@ SELECT run_command_on_workers($cmd$
|
|||
SELECT count(*) FROM pg_class WHERE relname = 't1_20000000';
|
||||
$cmd$);
|
||||
|
||||
SELECT run_command_on_workers($cmd$
|
||||
-- override the function for testing purpose
|
||||
create or replace function pg_catalog.citus_local_disk_space_stats(OUT available_disk_size bigint, OUT total_disk_size bigint)
|
||||
as $BODY$
|
||||
|
@ -117,7 +113,6 @@ SELECT run_command_on_workers($cmd$
|
|||
select 8500 into total_disk_size;
|
||||
end
|
||||
$BODY$ language plpgsql;
|
||||
$cmd$);
|
||||
|
||||
-- When there would not be enough free space left after the move, the move should fail
|
||||
SELECT master_move_shard_placement(20000001, 'localhost', :worker_2_port, 'localhost', :worker_1_port);
|
||||
|
|
Loading…
Reference in New Issue