Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[8.15][Backport] Test Runner: Catch Net::ReadTimeout when retrying actions #2451

Merged
merged 1 commit into from
Jul 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions elasticsearch-api/api-spec-testing/test_file.rb
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@ def run_actions_and_retry(actions)
action.execute(client)
true
rescue Elastic::Transport::Transport::Errors::RequestTimeout,
Net::ReadTimeout, # TODO: Replace this if we change adapters
Elastic::Transport::Transport::Errors::ServiceUnavailable => e
# The action sometimes gets the cluster in a recovering state, so we
# retry a few times and then raise an exception if it's still
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
if defined_path_parts.empty?
{ endpoint: spec.endpoint_name }
else
{ endpoint: spec.endpoint_name, defined_params: defined_path_parts}
{ endpoint: spec.endpoint_name, defined_params: defined_path_parts }
end
end

Expand Down
4 changes: 2 additions & 2 deletions elasticsearch/spec/integration/opentelemetry_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,12 @@
end

after do
client.delete(index: 'myindex', id: 1); rescue
client.delete(index: 'myindex', id: 1); rescue
end

context 'when a request is instrumented' do
it 'sets the span name to the endpoint id' do
client.search(body: { query: { match: {a: 1} } })
client.search(body: { query: { match: { a: 1 } } })
expect(span.name).to eq 'search'
end

Expand Down