From 57a4e5594d1a332f0db6137a5b29976a0d181087 Mon Sep 17 00:00:00 2001 From: Asias He Date: Tue, 23 Jan 2024 11:03:25 +0800 Subject: [PATCH] test: Check repair status in ScyllaRESTAPIClient Raise an exception in case the repair is not successful. --- test/pylib/rest_client.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/pylib/rest_client.py b/test/pylib/rest_client.py index 93e239d11d..67bfced5bb 100644 --- a/test/pylib/rest_client.py +++ b/test/pylib/rest_client.py @@ -292,7 +292,8 @@ class ScyllaRESTAPIClient(): """Repair the given table and wait for it to complete""" sequence_number = await self.client.post_json(f"/storage_service/repair_async/{keyspace}", host=node_ip, params={"columnFamilies": table}) status = await self.client.get_json(f"/storage_service/repair_status", host=node_ip, params={"id": str(sequence_number)}) - return status + if status != 'SUCCESSFUL': + raise Exception(f"Repair id {sequence_number} on node {node_ip} for table {keyspace}.{table} failed: status={status}") class ScyllaMetrics: def __init__(self, lines: list[str]):