Skip to content

Commit

Permalink
fix: wait-for units instead of applications (#659)
Browse files Browse the repository at this point in the history
  • Loading branch information
orfeas-k authored Jan 24, 2025
1 parent ac2dc4a commit 714541b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 3 additions & 2 deletions tests/integration/test_kfp_functional_v1.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,10 @@ async def test_build_and_deploy(ops_test: OpsTest, request, lightkube_client):
# Use `juju wait-for` instead of `wait_for_idle()`
# due to https://github.com/canonical/kfp-operators/issues/601
# and https://github.com/juju/python-libjuju/issues/1204
# Also check status of the unit instead of application due to
# https://github.com/juju/juju/issues/18625
log.info("Waiting on model applications to be active")
sh.juju("wait-for","model","kubeflow", query="forEach(applications, app => app.status == 'active')", timeout="30m")

sh.juju("wait-for","model","kubeflow", query="forEach(units, unit => unit.workload-status == 'active')", timeout="30m")

# ---- KFP API Server focused test cases
async def test_upload_pipeline(kfp_client):
Expand Down
4 changes: 3 additions & 1 deletion tests/integration/test_kfp_functional_v2.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,10 @@ async def test_build_and_deploy(ops_test: OpsTest, request, lightkube_client):
# Use `juju wait-for` instead of `wait_for_idle()`
# due to https://github.com/canonical/kfp-operators/issues/601
# and https://github.com/juju/python-libjuju/issues/1204
# Also check status of the unit instead of application due to
# https://github.com/juju/juju/issues/18625
log.info("Waiting on model applications to be active")
sh.juju("wait-for","model","kubeflow", query="forEach(applications, app => app.status == 'active')", timeout="30m")
sh.juju("wait-for","model","kubeflow", query="forEach(units, unit => unit.workload-status == 'active')", timeout="30m")

# ---- KFP API Server focused test cases
async def test_upload_pipeline(kfp_client):
Expand Down

0 comments on commit 714541b

Please sign in to comment.