Skip to content

Commit 3526f11

Browse files
committed
[Test Runner] Adds timeout/retry options for stack too
1 parent 754827a commit 3526f11

File tree

1 file changed

+4
-10
lines changed
  • elasticsearch-api/spec/yaml-test-runner

1 file changed

+4
-10
lines changed

elasticsearch-api/spec/yaml-test-runner/run.rb

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -56,19 +56,13 @@ def serverless?
5656
options = {
5757
host: host,
5858
transport_options: transport_options,
59+
retry_on_status: [409, 400, 503],
60+
retry_on_failure: 30,
61+
delay_on_retry: 10_000,
62+
request_timeout: 120
5963
}
6064
options.merge!({ api_key: ENV['ES_API_KEY'] }) if ENV['ES_API_KEY']
6165

62-
if serverless?
63-
options.merge!(
64-
{
65-
retry_on_status: [409, 400, 503],
66-
retry_on_failure: 30,
67-
delay_on_retry: 10_000,
68-
request_timeout: 120
69-
}
70-
)
71-
end
7266
CLIENT = Elasticsearch::Client.new(options)
7367

7468
tests_path = File.expand_path('./tmp', __dir__)

0 commit comments

Comments
 (0)