Skip to content

Commit 6c89e67

Browse files
authored
Fixed flaky 'test_group_name_change_substitute' (#739)
1 parent 6cdb248 commit 6c89e67

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

tests/integration/workspace_access/test_groups.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -187,8 +187,9 @@ def test_group_name_change_substitute(ws, sql_backend, inventory_schema, make_uc
187187

188188

189189
@retried(on=[NotFound], timeout=timedelta(minutes=2))
190-
def test_group_matching_names(ws, sql_backend, inventory_schema, make_ucx_group):
191-
ws_group, accnt_group = make_ucx_group("test_group_1234", "same_group_[1234]")
190+
def test_group_matching_names(ws, sql_backend, inventory_schema, make_ucx_group, make_random):
191+
rand_elem = make_random(4)
192+
ws_group, accnt_group = make_ucx_group(f"test_group_{rand_elem}", f"same_group_[{rand_elem}]")
192193
logger.info(
193194
f"Attempting Mapping From Workspace Group {ws_group.display_name} to "
194195
f"Account Group {accnt_group.display_name}"
@@ -199,8 +200,8 @@ def test_group_matching_names(ws, sql_backend, inventory_schema, make_ucx_group)
199200
inventory_schema,
200201
[ws_group.display_name],
201202
"ucx-temp-",
202-
workspace_group_regex=r"([0-9]*)$",
203-
account_group_regex=r"\[([0-9]*)\]",
203+
workspace_group_regex=r"([0-9a-zA-Z]*)$",
204+
account_group_regex=r"\[([0-9a-zA-Z]*)\]",
204205
)
205206
validate_migrate_groups(group_manager, ws_group, accnt_group)
206207

0 commit comments

Comments
 (0)