mirror of
https://github.com/logos-blockchain/logos-blockchain-e2e-tests.git
synced 2026-01-05 22:53:11 +00:00
fix: add response content check
- minor log changes - return try to disperse_data - increase timeouts
This commit is contained in:
parent
ca8eabfc35
commit
51d108ccd0
27
.github/prune-vm/action.yml
vendored
Normal file
27
.github/prune-vm/action.yml
vendored
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
# Inspired by https://github.com/AdityaGarg8/remove-unwanted-software
|
||||||
|
# to free up disk space. Currently removes Dotnet, Android and Haskell.
|
||||||
|
name: Remove unwanted software
|
||||||
|
description: Default GitHub runners come with a lot of unnecessary software
|
||||||
|
runs:
|
||||||
|
using: "composite"
|
||||||
|
steps:
|
||||||
|
- name: Disk space report before modification
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
echo "==> Available space before cleanup"
|
||||||
|
echo
|
||||||
|
df -h
|
||||||
|
- name: Maximize build disk space
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
set -euo pipefail
|
||||||
|
sudo rm -rf /usr/share/dotnet
|
||||||
|
sudo rm -rf /usr/local/lib/android
|
||||||
|
sudo rm -rf /opt/ghc
|
||||||
|
sudo rm -rf /usr/local/.ghcup
|
||||||
|
- name: Disk space report after modification
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
echo "==> Available space after cleanup"
|
||||||
|
echo
|
||||||
|
df -h
|
||||||
@ -34,7 +34,7 @@ class NomosCli:
|
|||||||
self._volumes = [cwd + "/" + volume for volume in self._volumes]
|
self._volumes = [cwd + "/" + volume for volume in self._volumes]
|
||||||
|
|
||||||
def run(self, input_values=None, **kwargs):
|
def run(self, input_values=None, **kwargs):
|
||||||
logger.debug(f"NomosCli initialized with log path {self._log_path}")
|
logger.debug(f"NomosCli starting with log path {self._log_path}")
|
||||||
|
|
||||||
self._port_map = {}
|
self._port_map = {}
|
||||||
|
|
||||||
|
|||||||
@ -43,7 +43,7 @@ class NomosNode:
|
|||||||
|
|
||||||
@retry(stop=stop_after_delay(60), wait=wait_fixed(0.1), reraise=True)
|
@retry(stop=stop_after_delay(60), wait=wait_fixed(0.1), reraise=True)
|
||||||
def start(self, wait_for_node_sec=120, **kwargs):
|
def start(self, wait_for_node_sec=120, **kwargs):
|
||||||
logger.debug(f"Starting Node {self._container_name}")
|
logger.debug(f"Starting Node {self._container_name} with role {self._node_type}")
|
||||||
self._docker_manager.create_network()
|
self._docker_manager.create_network()
|
||||||
self._ext_ip = self._docker_manager.generate_random_ext_ip()
|
self._ext_ip = self._docker_manager.generate_random_ext_ip()
|
||||||
|
|
||||||
|
|||||||
@ -59,8 +59,15 @@ def prepare_get_range_request(app_id, start_index, end_index):
|
|||||||
return query_data
|
return query_data
|
||||||
|
|
||||||
|
|
||||||
class StepsDataAvailability(StepsCommon):
|
def response_contains_data(response):
|
||||||
|
for index, blobs in response:
|
||||||
|
if len(blobs) != 0:
|
||||||
|
return True
|
||||||
|
|
||||||
|
return False
|
||||||
|
|
||||||
|
|
||||||
|
class StepsDataAvailability(StepsCommon):
|
||||||
def find_executor_node(self):
|
def find_executor_node(self):
|
||||||
executor = {}
|
executor = {}
|
||||||
for node in self.main_nodes:
|
for node in self.main_nodes:
|
||||||
@ -69,13 +76,17 @@ class StepsDataAvailability(StepsCommon):
|
|||||||
return executor
|
return executor
|
||||||
|
|
||||||
@allure.step
|
@allure.step
|
||||||
@retry(stop=stop_after_delay(20), wait=wait_fixed(0.1), reraise=True)
|
@retry(stop=stop_after_delay(65), wait=wait_fixed(1), reraise=True)
|
||||||
def disperse_data(self, data, app_id, index):
|
def disperse_data(self, data, app_id, index):
|
||||||
request = prepare_dispersal_request(data, app_id, index)
|
request = prepare_dispersal_request(data, app_id, index)
|
||||||
executor = self.find_executor_node()
|
executor = self.find_executor_node()
|
||||||
executor.send_dispersal_request(request)
|
try:
|
||||||
|
executor.send_dispersal_request(request)
|
||||||
|
except Exception as ex:
|
||||||
|
assert "Bad Request" in str(ex) or "Internal Server Error" in str(ex)
|
||||||
|
|
||||||
@allure.step
|
@allure.step
|
||||||
|
@retry(stop=stop_after_delay(45), wait=wait_fixed(1), reraise=True)
|
||||||
def get_data_range(self, node, app_id, start, end):
|
def get_data_range(self, node, app_id, start, end):
|
||||||
response = []
|
response = []
|
||||||
query = prepare_get_range_request(app_id, start, end)
|
query = prepare_get_range_request(app_id, start, end)
|
||||||
@ -84,4 +95,6 @@ class StepsDataAvailability(StepsCommon):
|
|||||||
except Exception as ex:
|
except Exception as ex:
|
||||||
assert "Bad Request" in str(ex) or "Internal Server Error" in str(ex)
|
assert "Bad Request" in str(ex) or "Internal Server Error" in str(ex)
|
||||||
|
|
||||||
|
assert response_contains_data(response), "Get data range response is empty"
|
||||||
|
|
||||||
return response
|
return response
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user