From 9af7c98ff34b0f88e8ebbd83a0497b280fff7ae3 Mon Sep 17 00:00:00 2001 From: Radoslaw Kaminski Date: Thu, 13 Mar 2025 09:46:12 +0000 Subject: [PATCH] handle none response and remove assertion --- src/steps/da.py | 3 +++ tests/dos_robustness/test_large_volume.py | 3 +-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/steps/da.py b/src/steps/da.py index 44428fc..8fd60e5 100644 --- a/src/steps/da.py +++ b/src/steps/da.py @@ -29,6 +29,9 @@ def prepare_get_range_request(app_id, start_index, end_index): def response_contains_data(response): + if response is None: + return False + for index, blobs in response: if len(blobs) != 0: return True diff --git a/tests/dos_robustness/test_large_volume.py b/tests/dos_robustness/test_large_volume.py index 2f153be..6493f64 100644 --- a/tests/dos_robustness/test_large_volume.py +++ b/tests/dos_robustness/test_large_volume.py @@ -30,8 +30,7 @@ class TestLargeVolume(StepsDataAvailability): assert response.status_code == 200 delay(5) - rcv_data = self.get_data_range(self.node2, to_app_id(1), to_index(0), to_index(5), timeout_duration=20, interval=1) - assert rcv_data is not None + self.get_data_range(self.node2, to_app_id(1), to_index(0), to_index(5), timeout_duration=20, interval=1) @pytest.mark.usefixtures("setup_2_node_cluster") @pytest.mark.parametrize(