Skip to content

Commit 73c5d2d

Browse files
Put a timeout to integration tests (#447)
1 parent 643ff5c commit 73c5d2d

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

.github/workflows/integration_test.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ jobs:
2828
extra-arguments: '-m openstack --log-format="%(asctime)s %(levelname)s %(message)s"'
2929
self-hosted-runner: true
3030
self-hosted-runner-label: stg-private-endpoint
31+
test-timeout: 90
3132
openstack-interface-tests-private-endpoint:
3233
name: openstack interface test using private-endpoint
3334
uses: canonical/operator-workflows/.github/workflows/integration_test.yaml@main

tests/integration/helpers/common.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -391,7 +391,9 @@ async def is_upgrade_charm_event_emitted(unit: Unit) -> bool:
391391
"""
392392
unit_name_without_slash = unit.name.replace("/", "-")
393393
juju_unit_log_file = f"/var/log/juju/unit-{unit_name_without_slash}.log"
394-
ret_code, stdout, stderr = await run_in_unit(unit=unit, command=f"cat {juju_unit_log_file}")
394+
ret_code, stdout, stderr = await run_in_unit(
395+
unit=unit, command=f"cat {juju_unit_log_file} | grep 'Emitting Juju event upgrade_charm.'"
396+
)
395397
assert ret_code == 0, f"Failed to read the log file: {stderr}"
396398
return stdout is not None and "Emitting Juju event upgrade_charm." in stdout
397399

0 commit comments

Comments
 (0)