Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make test_jobs_with_no_inventory_database resilient to concurrent object deletes #586

Merged
merged 2 commits into from
Nov 16, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions tests/integration/test_installation.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from datetime import timedelta

import pytest
from databricks.sdk.errors import OperationFailed
from databricks.sdk.errors import NotFound, OperationFailed
from databricks.sdk.retries import retried
from databricks.sdk.service.catalog import SchemaInfo
from databricks.sdk.service.iam import PermissionLevel
Expand Down Expand Up @@ -77,6 +77,7 @@ def test_logs_are_available(ws, sql_backend, env_or_skip, make_random):
assert len(workflow_run_logs) == 1


@retried(on=[NotFound], timeout=timedelta(minutes=15))
def test_jobs_with_no_inventory_database(
ws,
sql_backend,
Expand Down Expand Up @@ -247,6 +248,6 @@ def validate_tacl():
logger.debug(f"cleaning up install folder: {install._install_folder}")
ws.workspace.delete(install._install_folder, recursive=True)

for step, job_id in install._deployed_steps.items():
for step, job_id in install._state.jobs.items():
logger.debug(f"cleaning up {step} job_id={job_id}")
ws.jobs.delete(job_id)
Loading