From da9b8865ee848626ea6f47a8989045acfa07f770 Mon Sep 17 00:00:00 2001 From: Georgy Moshkin <gmoshkin@picodata.io> Date: Tue, 9 Jul 2024 16:51:47 +0300 Subject: [PATCH] test: reduce test_ddl_drop_table_partial_failure flakiness --- test/int/test_ddl.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/test/int/test_ddl.py b/test/int/test_ddl.py index 220dd39a47..870bcf03d9 100644 --- a/test/int/test_ddl.py +++ b/test/int/test_ddl.py @@ -1,6 +1,5 @@ import pytest -import time -from conftest import PICO_SERVICE_ID, Cluster, ReturnError +from conftest import PICO_SERVICE_ID, Cluster, ReturnError, Retriable, Instance def test_ddl_abort(cluster: Cluster): @@ -1031,8 +1030,14 @@ def test_ddl_drop_table_partial_failure(cluster: Cluster): i4.start() i4.wait_online() - # TODO: how do we sync raft log at this point? - time.sleep(2) + def check_no_pending_schema_change(i: Instance): + rows = i.sql( + """select count(*) from "_pico_property" where "key" = 'pending_schema_change'""" + ) + assert rows == [[0]] + + # Wait until the schema change is finalized + Retriable(timeout=5, rps=2).call(check_no_pending_schema_change, i1) # Now space is dropped. assert i1.call("box.space._space.index.name:get", table_name) is None -- GitLab