diff --git a/src/node/nomos_node.py b/src/node/nomos_node.py index a46ce26..86c5658 100644 --- a/src/node/nomos_node.py +++ b/src/node/nomos_node.py @@ -123,6 +123,9 @@ class NomosNode: def node_type(self): return self._node_type + def name(self): + return self._container_name + def check_nomos_log_errors(self, whitelist=None): keywords = LOG_ERROR_KEYWORDS diff --git a/tests/data_integrity/test_data_integrity.py b/tests/data_integrity/test_data_integrity.py index e68544d..40eae4a 100644 --- a/tests/data_integrity/test_data_integrity.py +++ b/tests/data_integrity/test_data_integrity.py @@ -19,14 +19,20 @@ class TestDataIntegrity(StepsDataAvailability): def test_da_identify_retrieve_missing_columns(self): self.disperse_data(DATA_TO_DISPERSE[1], to_app_id(1), to_index(0)) delay(5) - # Select one target node at random to get blob data for 1/2 columns - selected_node = self.main_nodes[random.randint(1, 3)] - rcv_data = self.get_data_range(selected_node, to_app_id(1), to_index(0), to_index(5)) - rcv_data_json = json.dumps(rcv_data) + test_results = [] + # Iterate through standard nodes to get blob data for 1/2 columns + for node in self.main_nodes[1:4]: + rcv_data = self.get_data_range(node, to_app_id(1), to_index(0), to_index(5)) + rcv_data_json = json.dumps(rcv_data) - reconstructed_data = NomosCli(command="reconstruct").run(input_values=[rcv_data_json]) + reconstructed_data = NomosCli(command="reconstruct").run(input_values=[rcv_data_json]) - assert DATA_TO_DISPERSE[1] == reconstructed_data, "Reconstructed data are not same with original data" + if DATA_TO_DISPERSE[1] == reconstructed_data: + test_results.append(node.name()) + + assert len(test_results) > 0, "Dispersed data were not received by any node" + + logger.info(f"Dispersed data received by : {test_results}") @pytest.mark.usefixtures("setup_2_node_cluster") def test_da_sampling_determines_data_presence(self):