diff options
Diffstat (limited to 'qa/qa/specs/features/api/3_create/gitaly/praefect_replication_queue_spec.rb')
-rw-r--r-- | qa/qa/specs/features/api/3_create/gitaly/praefect_replication_queue_spec.rb | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/qa/qa/specs/features/api/3_create/gitaly/praefect_replication_queue_spec.rb b/qa/qa/specs/features/api/3_create/gitaly/praefect_replication_queue_spec.rb index b6296b5a263..a53614960cd 100644 --- a/qa/qa/specs/features/api/3_create/gitaly/praefect_replication_queue_spec.rb +++ b/qa/qa/specs/features/api/3_create/gitaly/praefect_replication_queue_spec.rb @@ -3,10 +3,7 @@ require 'parallel' module QA - RSpec.describe 'Create', quarantine: { - issue: 'https://gitlab.com/gitlab-org/gitlab/-/issues/361382', - type: :investigating - } do + RSpec.describe 'Create' do context 'Gitaly Cluster replication queue', :orchestrated, :gitaly_cluster, :skip_live_env do let(:praefect_manager) { Service::PraefectManager.new } let(:project) do @@ -35,6 +32,9 @@ module QA # to `in_progress`, and create a job lock for each one. queue_size_target = 10 + # During normal operations we avoid create a replication event + # https://gitlab.com/groups/gitlab-org/-/epics/7741 + praefect_manager.stop_secondary_node Git::Repository.perform do |repository| repository.uri = project.repository_http_location.uri repository.use_default_credentials @@ -46,11 +46,12 @@ module QA end repository.push_all_branches end + praefect_manager.start_secondary_node - count = 0 - while count < 1 + Support::Retrier.retry_until(max_duration: 60) do count = praefect_manager.replication_queue_lock_count QA::Runtime::Logger.debug("Lock count: #{count}") + count >= 1 end praefect_manager.stop_praefect @@ -58,12 +59,12 @@ module QA praefect_manager.start_praefect - # Create a new project, push to it, and check that replication occurs - project_push = Resource::Repository::ProjectPush.fabricate! do |push| - push.project_name = "gitaly_cluster" + # Create a new project, and check that replication occurs + new_project = Resource::Project.fabricate! do |project| + project.initialize_with_readme = true end - expect(praefect_manager.replicated?(project_push.project.id)).to be true + expect(praefect_manager.replicated?(new_project.id, new_project.name)).to be true end end end |