# HG changeset patch # User Daniel Dourvaris # Date 2019-10-10 09:36:55 # Node ID 9eaff08c7fa4fc4864870aad0f42fc1e96ee4287 # Parent 95009b088bed2789a54a24d00ea66c24935d4380 tests: try to stabilize integration tests. diff --git a/rhodecode/tests/integrations/test_integration.py b/rhodecode/tests/integrations/test_integration.py --- a/rhodecode/tests/integrations/test_integration.py +++ b/rhodecode/tests/integrations/test_integration.py @@ -47,6 +47,15 @@ class TestDeleteScopesDeletesIntegration assert integration is None +count = 1 + +def counter(): + global count + val = count + count += 1 + return '{}_{}'.format(val, time.time()) + + @pytest.fixture() def integration_repos(request, StubIntegrationType, stub_integration_settings): """ @@ -63,27 +72,26 @@ def integration_repos(request, StubInteg """ fixture = Fixture() - - parent_group_id = 'int_test_parent_group_%s' % time.time() + parent_group_id = 'int_test_parent_group_{}'.format(counter()) parent_group = fixture.create_repo_group(parent_group_id) - other_group_id = 'int_test_other_group_%s' % time.time() + other_group_id = 'int_test_other_group_{}'.format(counter()) other_group = fixture.create_repo_group(other_group_id) child_group_id = ( - parent_group_id + '/' + 'int_test_child_group_%s' % time.time()) + parent_group_id + '/' + 'int_test_child_group_{}'.format(counter())) child_group = fixture.create_repo_group(child_group_id) - parent_repo_id = 'int_test_parent_repo_%s' % time.time() + parent_repo_id = 'int_test_parent_repo_{}'.format(counter()) parent_repo = fixture.create_repo(parent_repo_id, repo_group=parent_group) - child_repo_id = 'int_test_child_repo_%s' % time.time() + child_repo_id = 'int_test_child_repo_{}'.format(counter()) child_repo = fixture.create_repo(child_repo_id, repo_group=child_group) - other_repo_id = 'int_test_other_repo_%s' % time.time() + other_repo_id = 'int_test_other_repo_{}'.format(counter()) other_repo = fixture.create_repo(other_repo_id, repo_group=other_group) - root_repo_id = 'int_test_repo_root_%s' % time.time() + root_repo_id = 'int_test_repo_root_{}'.format(counter()) root_repo = fixture.create_repo(root_repo_id) integrations = {}