From 3526f114bba02f523ebc2def58b972aa0dddd249 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Thu, 29 May 2025 09:14:00 +0100 Subject: [PATCH] [Test Runner] Adds timeout/retry options for stack too --- elasticsearch-api/spec/yaml-test-runner/run.rb | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/elasticsearch-api/spec/yaml-test-runner/run.rb b/elasticsearch-api/spec/yaml-test-runner/run.rb index 8bccc1779f..8a8b1bd3c8 100644 --- a/elasticsearch-api/spec/yaml-test-runner/run.rb +++ b/elasticsearch-api/spec/yaml-test-runner/run.rb @@ -56,19 +56,13 @@ def serverless? options = { host: host, transport_options: transport_options, + retry_on_status: [409, 400, 503], + retry_on_failure: 30, + delay_on_retry: 10_000, + request_timeout: 120 } options.merge!({ api_key: ENV['ES_API_KEY'] }) if ENV['ES_API_KEY'] -if serverless? - options.merge!( - { - retry_on_status: [409, 400, 503], - retry_on_failure: 30, - delay_on_retry: 10_000, - request_timeout: 120 - } - ) -end CLIENT = Elasticsearch::Client.new(options) tests_path = File.expand_path('./tmp', __dir__)