Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Add exception handling in `wait_for_rest_api` to make wait for LS REST API retriable. Remove unnecessary wait for LS process.
  • Loading branch information
mashhurs authored Mar 4, 2025
1 parent aea7b15 commit 9d0e1c0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 2 additions & 0 deletions qa/integration/services/logstash_service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,8 @@ def is_port_open?
def rest_active?
result = monitoring_api.node_info
!result.nil?
rescue
return false
end

def monitoring_api
Expand Down
1 change: 0 additions & 1 deletion qa/integration/specs/logstash_to_logstash_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ def run_logstash_instance(config_name, options = {}, &block)
"--path.config", config_to_temp_file(@fixture.config(config_name, options)),
"--path.data", get_temp_path_dir,
"--api.http.port", api_port.to_s)
logstash_service.wait_for_logstash
logstash_service.wait_for_rest_api
yield logstash_service
ensure
Expand Down

0 comments on commit 9d0e1c0

Please sign in to comment.