Skip to content

Commit ea85f24

Browse files
authored
Fix test failure: test_running_real_remove_backup_groups_job (#2692)
## Changes Verify the "remove-workspace-local-backup-groups" finished successfully before checking the group was deleted ### Linked issues (Hopefully) Resolves #2691. The eventual consistency of the groups API makes testing difficult. ### Tests - [x] modified integration tests: `test_running_real_remove_backup_groups_job`
1 parent 577cd6f commit ea85f24

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

tests/integration/install/test_installation.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,13 +183,15 @@ def test_running_real_remove_backup_groups_job(ws: WorkspaceClient, installation
183183

184184
installation_ctx.deployed_workflows.run_workflow("remove-workspace-local-backup-groups")
185185

186+
assert installation_ctx.deployed_workflows.validate_step("remove-workspace-local-backup-groups")
187+
186188
# Group deletion is eventually consistent. Although the group manager tries to wait for convergence, parts of the
187189
# API internals have a 60s timeout. As such we should wait at least that long before concluding deletion has not
188190
# happened.
189-
# Note: If you are adjusting this, also look at: test_running_real_remove_backup_groups_job
191+
# Note: If you are adjusting this, also look at: test_delete_ws_groups_should_delete_renamed_and_reflected_groups_only
190192
@retried(on=[KeyError], timeout=timedelta(minutes=3))
191193
def get_group(group_id: str) -> NoReturn:
192-
_ = ws.groups.get(group_id)
194+
ws.groups.get(group_id)
193195
raise KeyError(f"Group is not deleted: {group_id}")
194196

195197
with pytest.raises(NotFound):

tests/integration/workspace_access/test_groups.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ def test_delete_ws_groups_should_delete_renamed_and_reflected_groups_only(
152152
# Note: If you are adjusting this, also look at: test_running_real_remove_backup_groups_job
153153
@retried(on=[KeyError], timeout=timedelta(seconds=90))
154154
def get_group(group_id: str) -> NoReturn:
155-
_ = ws.groups.get(group_id)
155+
ws.groups.get(group_id)
156156
raise KeyError(f"Group is not deleted: {group_id}")
157157

158158
with pytest.raises(NotFound):

0 commit comments

Comments
 (0)