Skip to content

Commit 7e16bff

Browse files
committed
[CI] Test Runner: Give time to redo cleanup tasks to x-pack
1 parent b04a913 commit 7e16bff

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

api-spec-testing/test_file.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,8 @@ def setup
130130
raise e if count > 9
131131

132132
redo
133-
rescue Elasticsearch::Transport::Transport::Errors::BadRequest => e
133+
rescue Elasticsearch::Transport::Transport::Errors::BadRequest,
134+
Elasticsearch::Transport::Transport::Errors::Conflict => e
134135
error = JSON.parse(e.message.gsub(/\[[0-9]{3}\] /, ''))['error']['root_cause'].first
135136
count += 1
136137

@@ -139,6 +140,7 @@ def setup
139140
client.indices.delete(index: error['index']) if error['reason'] =~ /index \[.+\] already exists/
140141
raise e if count > 9
141142

143+
sleep(1)
142144
redo
143145
end
144146
end

0 commit comments

Comments
 (0)