Skip to content

Commit

Permalink
Update test-local.py: add timeout to mosquitto_sub
Browse files Browse the repository at this point in the history
  • Loading branch information
schaubl authored May 8, 2024
1 parent b411fe7 commit 3282f96
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/integration_tests/test-local.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,8 @@ def test_nuvlaedge_local_compute_api(request):
def test_nuvlaedge_local_datagateway():
nuvlaedge_network = local_project_name + '-shared-network'

print(f'Retrieving NuvlaEdge shared network ({nuvlaedge_network}) ...', flush=True)
logging.info(f'Retrieving NuvlaEdge shared network ({nuvlaedge_network}) ...')
print(f'P: Retrieving NuvlaEdge shared network ({nuvlaedge_network}) ...', flush=True)
logging.info(f'L: Retrieving NuvlaEdge shared network ({nuvlaedge_network}) ...')
sys.stdout.flush()
sys.stderr.flush()

Expand Down Expand Up @@ -177,7 +177,7 @@ def retry_run_in_container(cmd):
sys.stdout.flush()
sys.stderr.flush()

check_mqtt = retry_run_in_container('sh -c "apk add mosquitto-clients >/dev/null && mosquitto_sub -h data-gateway -t nuvlaedge-status -C 1"')
check_mqtt = retry_run_in_container('sh -c "apk add mosquitto-clients >/dev/null && mosquitto_sub -h data-gateway -t nuvlaedge-status -C 1 -W 90"')
nb_status = json.loads(check_mqtt.decode())
assert nb_status['status'] == 'OPERATIONAL', f'MQTT check of the NuvlaEdge status failed: {nb_status}'

Expand Down

0 comments on commit 3282f96

Please sign in to comment.