Fix flaky test

This commit is contained in:
Alexey Milovidov 2020-08-15 12:37:05 +03:00
parent b0ffde5825
commit aaddb6a086

View File

@ -31,6 +31,11 @@ INSERT INTO replicated_constraints1 VALUES (10, 10);
INSERT INTO replicated_constraints2 VALUES (10, 10); INSERT INTO replicated_constraints2 VALUES (10, 10);
ALTER TABLE replicated_constraints1 ADD CONSTRAINT b_constraint CHECK b > 10; ALTER TABLE replicated_constraints1 ADD CONSTRAINT b_constraint CHECK b > 10;
-- Otherwise "Metadata on replica is not up to date with common metadata in Zookeeper. Cannot alter." is possible.
SYSTEM SYNC REPLICA replicated_constraints1;
SYSTEM SYNC REPLICA replicated_constraints2;
ALTER TABLE replicated_constraints2 ADD CONSTRAINT a_constraint CHECK a < 10; ALTER TABLE replicated_constraints2 ADD CONSTRAINT a_constraint CHECK a < 10;
SYSTEM SYNC REPLICA replicated_constraints1; SYSTEM SYNC REPLICA replicated_constraints1;
@ -40,4 +45,4 @@ INSERT INTO replicated_constraints1 VALUES (10, 11); -- { serverError 469 }
INSERT INTO replicated_constraints2 VALUES (9, 10); -- { serverError 469 } INSERT INTO replicated_constraints2 VALUES (9, 10); -- { serverError 469 }
DROP TABLE replicated_constraints1; DROP TABLE replicated_constraints1;
DROP TABLE replicated_constraints2; DROP TABLE replicated_constraints2;