Fail on alter instead

niupre-reuse-connections-for-logical-ref-fkeys
Nitish Upreti 2022-09-14 17:11:23 -07:00
parent 34274fb8b8
commit bf33d2a993
1 changed files with 8 additions and 5 deletions

View File

@ -32,12 +32,15 @@ INSERT INTO t SELECT x, x+1, MD5(random()::text) FROM generate_series(1,100000)
-- Initial shard placements
SELECT * FROM shards_in_workers;
-- failure on creating the subscription
SELECT citus.mitmproxy('conn.onQuery(query="CREATE SUBSCRIPTION").kill()');
-- Log minimal messages to avoid printing the error message and make the test flaky
SET client_min_messages TO ERROR;
-- Failure on creating the subscription
-- Failing exactly on CREATE SUBSCRIPTION is causing flaky test where we fail with :
-- 1) ERROR: connection to the remote node localhost:xxxxx failed with the following error: ERROR: subscription "citus_shard_move_subscription_xxxxxxx" does not exist
-- another command is already in progress
-- 2) ERROR: connection to the remote node localhost:xxxxx failed with the following error: another command is already in progress
-- Instead fail on the next step (ALTER SUBSCRIPTION) instead which is also required logically as part of CREATE SUBSCRIPTION.
SELECT citus.mitmproxy('conn.onQuery(query="ALTER SUBSCRIPTION").kill()');
SELECT master_move_shard_placement(101, 'localhost', :worker_1_port, 'localhost', :worker_2_proxy_port);
RESET client_min_messages;
-- Verify that the shard is not moved and the number of rows are still 100k
SELECT * FROM shards_in_workers;