Commit d1126e6d authored by Anastasia McDonald's avatar Anastasia McDonald

Merge branch 'jmd-fixing-gitaly-backend-node-recovery-tests' into 'master'

Fixing gitaly backend node recovery tests

See merge request gitlab-org/gitlab!72159
parents 6958dbbc 8b995a98
......@@ -376,7 +376,6 @@ module QA
select job from replication_queue
where state = 'ready'
and job ->> 'change' = 'update'
and job ->> 'source_node_storage' = '#{current_primary_node}'
and job ->> 'target_node_storage' = '#{@primary_node}';
SQL
) do |line|
......
......@@ -31,14 +31,6 @@ module QA
praefect_manager.stop_primary_node
praefect_manager.wait_for_gitaly_check
# Confirm that we have access to the repo after failover
Support::Waiter.wait_until(retry_on_exception: true, sleep_interval: 5) do
Resource::Repository::Commit.fabricate_via_api! do |commits|
commits.project = project
commits.sha = project.default_branch
end
end
# Push a commit to the new primary
Resource::Repository::ProjectPush.fabricate! do |push|
push.project = project
......@@ -58,6 +50,11 @@ module QA
# Wait for automatic replication
praefect_manager.wait_for_replication(project.id)
# Force switch to the old primary node
# This ensures that the commit was replicated
praefect_manager.stop_secondary_node
praefect_manager.stop_tertiary_node
# Confirm that both commits are available
expect(project.commits.map { |commit| commit[:message].chomp })
.to include("Initial commit").and include("pushed after failover")
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment