summaryrefslogtreecommitdiff
path: root/qa/qa/service/praefect_manager.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-11-19 08:27:35 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-11-19 08:27:35 +0000
commit7e9c479f7de77702622631cff2628a9c8dcbc627 (patch)
treec8f718a08e110ad7e1894510980d2155a6549197 /qa/qa/service/praefect_manager.rb
parente852b0ae16db4052c1c567d9efa4facc81146e88 (diff)
downloadgitlab-ce-7e9c479f7de77702622631cff2628a9c8dcbc627.tar.gz
Add latest changes from gitlab-org/gitlab@13-6-stable-eev13.6.0-rc42
Diffstat (limited to 'qa/qa/service/praefect_manager.rb')
-rw-r--r--qa/qa/service/praefect_manager.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/qa/qa/service/praefect_manager.rb b/qa/qa/service/praefect_manager.rb
index 3a17acbb317..ab4f28c292f 100644
--- a/qa/qa/service/praefect_manager.rb
+++ b/qa/qa/service/praefect_manager.rb
@@ -206,14 +206,14 @@ module QA
def wait_for_new_primary_node(node)
QA::Runtime::Logger.info("Wait until #{node} is the primary node")
- with_praefect_log do |log|
+ with_praefect_log(max_duration: 120) do |log|
break true if log['msg'] == 'primary node changed' && log['newPrimary'] == node
end
end
def wait_for_new_primary
QA::Runtime::Logger.info("Wait until a new primary node is selected")
- with_praefect_log do |log|
+ with_praefect_log(max_duration: 120) do |log|
break true if log['msg'] == 'primary node changed'
end
end
@@ -406,8 +406,8 @@ module QA
end
end
- def with_praefect_log
- wait_until_shell_command("docker exec #{@praefect} bash -c 'tail -n 1 /var/log/gitlab/praefect/current'") do |line|
+ def with_praefect_log(**kwargs)
+ wait_until_shell_command("docker exec #{@praefect} bash -c 'tail -n 1 /var/log/gitlab/praefect/current'", **kwargs) do |line|
QA::Runtime::Logger.debug(line.chomp)
yield JSON.parse(line)
end