From d1722bf7e5c373e9f63301059cf4c70b3bb11003 Mon Sep 17 00:00:00 2001 From: Jarkko Jaakola Date: Tue, 17 Sep 2024 11:24:01 +0300 Subject: [PATCH] test: retry in schema forwarding test when changing compatibility --- tests/integration/test_master_coordinator.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/integration/test_master_coordinator.py b/tests/integration/test_master_coordinator.py index 225539f8d..949e789fa 100644 --- a/tests/integration/test_master_coordinator.py +++ b/tests/integration/test_master_coordinator.py @@ -210,7 +210,9 @@ async def test_schema_request_forwarding(registry_async_pair): path = "config" for compat in ["FULL", "BACKWARD", "FORWARD", "NONE"]: resp = requests.put(f"{slave_url}/{path}", json={"compatibility": compat}) - assert resp.ok + if not resp.ok: + # Allow retry if response is not ok. + continue while True: assert counter < max_tries, "Compat update not propagated" resp = requests.get(f"{master_url}/{path}")