fix: finish test da_dispersal_integration

This commit is contained in:
Roman 2025-04-23 14:07:17 +08:00
parent a229085822
commit 92bad26f33
No known key found for this signature in database
GPG Key ID: 583BDF43C238B83E
2 changed files with 11 additions and 11 deletions

View File

@ -44,11 +44,6 @@ def response_contains_data(response):
return False
def prepare_add_share_request(da_share):
da_share["share_idx"] = 137
return da_share
class StepsDataAvailability(StepsCommon):
def find_executor_node(self):
executor = {}
@ -138,12 +133,10 @@ class StepsDataAvailability(StepsCommon):
timeout_duration = kwargs.get("timeout_duration", 65)
interval = kwargs.get("interval", 0.1)
data = prepare_add_share_request(da_share)
@retry(stop=stop_after_delay(timeout_duration), wait=wait_fixed(interval), reraise=True)
def add_share():
try:
response = node.send_add_share_request(data)
response = node.send_add_share_request(da_share)
except Exception as ex:
logger.error(f"Exception while adding share: {ex}")
raise

View File

@ -25,7 +25,14 @@ class TestInteractionDataFlow(StepsDataAvailability, StepsConsensus, StepsStorag
index_shares = self.get_data_range(self.node2, to_app_id(1), to_index(0), to_index(5))
da_shares = extract_da_shares(index_shares)
logger.debug(f"da_shares: {da_shares}")
logger.debug(f"{len(da_shares)} da_shares extracted")
modified_da_share = da_shares[0]
modified_da_share["share_idx"] = 7
self.add_publish_share(self.node2, da_shares[0])
self.add_publish_share(self.node2, modified_da_share)
index_shares = self.get_data_range(self.node2, to_app_id(1), to_index(0), to_index(8))
da_shares = extract_da_shares(index_shares)
delay(5)
assert len(da_shares) < 3, "Modified da_share should not get published"