We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b04a913 commit 7e16bffCopy full SHA for 7e16bff
api-spec-testing/test_file.rb
@@ -130,7 +130,8 @@ def setup
130
raise e if count > 9
131
132
redo
133
- rescue Elasticsearch::Transport::Transport::Errors::BadRequest => e
+ rescue Elasticsearch::Transport::Transport::Errors::BadRequest,
134
+ Elasticsearch::Transport::Transport::Errors::Conflict => e
135
error = JSON.parse(e.message.gsub(/\[[0-9]{3}\] /, ''))['error']['root_cause'].first
136
count += 1
137
@@ -139,6 +140,7 @@ def setup
139
140
client.indices.delete(index: error['index']) if error['reason'] =~ /index \[.+\] already exists/
141
142
143
+ sleep(1)
144
145
end
146
0 commit comments