From cfc6190982d5522a13a69adf93a52449e629f3e2 Mon Sep 17 00:00:00 2001 From: Andrew Snare Date: Fri, 13 Sep 2024 19:22:43 +0200 Subject: [PATCH] Integration test reliability: update some tests to ensure they use unique group names (#2631) ## Changes This PR updates two integration tests that were using a fixed name for the fixture objects that they create. These can sometimes (spuriously) fail due to concurrent test runs against the same infrastructure. ### Tests - updated integration tests --- tests/integration/account/test_account.py | 2 +- tests/integration/framework/test_fixtures.py | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/integration/account/test_account.py b/tests/integration/account/test_account.py index 321f5043f6..2d51a63e29 100644 --- a/tests/integration/account/test_account.py +++ b/tests/integration/account/test_account.py @@ -33,7 +33,7 @@ def test_create_account_level_groups( make_random, clean_account_level_groups, ): - suffix = get_purge_suffix() + suffix = f"{make_random(4).lower()}-{get_purge_suffix()}" make_ucx_group(f"test_ucx_migrate_invalid-{suffix}", f"test_ucx_migrate_invalid-{suffix}") group_display_name = f"created_by_ucx_regular_group-{suffix}" diff --git a/tests/integration/framework/test_fixtures.py b/tests/integration/framework/test_fixtures.py index 5fb6b8cf7e..38a00ac1f9 100644 --- a/tests/integration/framework/test_fixtures.py +++ b/tests/integration/framework/test_fixtures.py @@ -26,8 +26,9 @@ def test_user(make_user): logger.info(f"created {make_user()}") -def test_group(make_group, make_user): - logger.info(f'created {make_group(display_name="abc", members=[make_user().id])}') +def test_group(make_group, make_user, make_random): + display_name = f"abc-{make_random(4)}" + logger.info(f'created {make_group(display_name=display_name, members=[make_user().id])}') def test_secret_scope(make_secret_scope):