Skip to content

Commit 83ebfa9

Browse files
Add assert to make sure installation is finished before re-installation (#3546)
## Changes The reinstallation is starting before the first installation is done. This is causing the warning to not be raised and the test fails ### Tests - [x] modified integration tests --------- Co-authored-by: Cor Zuurmond <jczuurmond@protonmail.com>
1 parent a517cb9 commit 83ebfa9

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

tests/integration/install/test_installation.py

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -392,12 +392,17 @@ def test_check_inventory_database_exists(ws, installation_ctx):
392392
installation_ctx.workspace_installer.configure()
393393

394394

395-
def test_compare_remote_local_install_versions(ws, installation_ctx):
395+
def test_compare_remote_local_install_versions(installation_ctx) -> None:
396396
installation_ctx.workspace_installation.run()
397-
with pytest.raises(
398-
RuntimeWarning,
399-
match="UCX workspace remote and local install versions are same and no override is requested. Exiting...",
400-
):
397+
398+
@retried(on=[NotFound], timeout=timedelta(minutes=2))
399+
def wait_for_installation_to_finish():
400+
installation_ctx.installation.load(WorkspaceConfig)
401+
402+
wait_for_installation_to_finish()
403+
404+
error_message = "UCX workspace remote and local install versions are same and no override is requested. Exiting..."
405+
with pytest.raises(RuntimeWarning, match=error_message):
401406
installation_ctx.workspace_installer.configure()
402407

403408
installation_ctx.replace(

0 commit comments

Comments
 (0)