Commit 8b995a98 authored by John McDonnell's avatar John McDonnell Committed by Anastasia McDonald

Fixing gitaly backend node recovery tests

parent 05914949
...@@ -376,7 +376,6 @@ module QA ...@@ -376,7 +376,6 @@ module QA
select job from replication_queue select job from replication_queue
where state = 'ready' where state = 'ready'
and job ->> 'change' = 'update' and job ->> 'change' = 'update'
and job ->> 'source_node_storage' = '#{current_primary_node}'
and job ->> 'target_node_storage' = '#{@primary_node}'; and job ->> 'target_node_storage' = '#{@primary_node}';
SQL SQL
) do |line| ) do |line|
......
...@@ -31,14 +31,6 @@ module QA ...@@ -31,14 +31,6 @@ module QA
praefect_manager.stop_primary_node praefect_manager.stop_primary_node
praefect_manager.wait_for_gitaly_check 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 # Push a commit to the new primary
Resource::Repository::ProjectPush.fabricate! do |push| Resource::Repository::ProjectPush.fabricate! do |push|
push.project = project push.project = project
...@@ -58,6 +50,11 @@ module QA ...@@ -58,6 +50,11 @@ module QA
# Wait for automatic replication # Wait for automatic replication
praefect_manager.wait_for_replication(project.id) 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 # Confirm that both commits are available
expect(project.commits.map { |commit| commit[:message].chomp }) expect(project.commits.map { |commit| commit[:message].chomp })
.to include("Initial commit").and include("pushed after failover") .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