Skip to content

Commit 636b903

Browse files
authored
Fixed test_migration_job_ext_hms timeout (#1678)
## Changes - Override job cluster in `ext_hms` tests to reuse `TEST_EXT_HMS_CLUSTER_ID` to avoid timeout. This also allows us to run this test during regular acceptance tests ### Linked issues <!-- DOC: Link issue with a keyword: close, closes, closed, fix, fixes, fixed, resolve, resolves, resolved. See https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword --> Resolves #1663 ### Tests <!-- How is this tested? Please see the checklist below and also describe any other relevant tests --> - [x] manually tested - [x] added unit tests - [x] verified on staging environment (screenshot attached) <img width="1155" alt="image" src="https://github.com/databrickslabs/ucx/assets/44292934/01a173e8-54e1-46b1-82e1-184375f6ce7a">
1 parent b4de9b6 commit 636b903

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

tests/integration/test_ext_hms.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ def sql_backend(ws, env_or_skip) -> SqlBackend:
9494

9595

9696
@retried(on=[NotFound, InvalidParameterValue], timeout=timedelta(minutes=5))
97-
@pytest.mark.parametrize('prepare_tables_for_migration', [('regular')], indirect=True)
97+
@pytest.mark.parametrize('prepare_tables_for_migration', ['regular'], indirect=True)
9898
def test_migration_job_ext_hms(ws, installation_ctx, prepare_tables_for_migration, env_or_skip):
9999
# this test spins up clusters using ext hms cluster policy, which will have a startup time of ~ 7-10m
100100
# skip this test if not in nightly test job or debug mode
@@ -143,9 +143,16 @@ def test_running_real_assessment_job_ext_hms(
143143
if os.path.basename(sys.argv[0]) not in {"_jb_pytest_runner.py", "testlauncher.py"}:
144144
env_or_skip("TEST_NIGHTLY")
145145

146+
ext_hms_cluster_id = env_or_skip("TEST_EXT_HMS_CLUSTER_ID")
146147
ext_hms_ctx = installation_ctx.replace(
147148
skip_dashboards=True,
148-
config_transform=lambda wc: dataclasses.replace(wc, override_clusters=None),
149+
config_transform=lambda wc: dataclasses.replace(
150+
wc,
151+
override_clusters={
152+
"main": ext_hms_cluster_id,
153+
"table_migration": ext_hms_cluster_id,
154+
},
155+
),
149156
extend_prompts={
150157
r"Instance pool id to be set.*": env_or_skip("TEST_INSTANCE_POOL_ID"),
151158
r".*Do you want to update the existing installation?.*": 'yes',

0 commit comments

Comments
 (0)