File tree Expand file tree Collapse file tree 1 file changed +13
-3
lines changed
elasticsearch-api/api-spec-testing Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -156,7 +156,7 @@ def wait_for_pending_rollup_tasks(client)
156
156
157
157
time = Time . now . to_i
158
158
results . each do |task |
159
- next if task . empty?
159
+ next if task . empty? || skippable_task? ( task )
160
160
161
161
logger . debug ( "Pending task: #{ task } " )
162
162
count += 1 if task . include? ( filter )
@@ -277,8 +277,8 @@ def wait_for_cluster_tasks(client)
277
277
loop do
278
278
results = client . cluster . pending_tasks
279
279
results [ 'tasks' ] . each do |task |
280
- names = [ 'health-node' , 'cluster:monitor/tasks/lists' , 'create-index-template-v2' ]
281
- next if task . empty? || names . select { | n | task [ 'source' ] . match? n } . any?
280
+
281
+ next if task . empty? || skippable_task? ( task )
282
282
283
283
logger . debug "Pending cluster task: #{ task } "
284
284
count += 1
@@ -287,6 +287,16 @@ def wait_for_cluster_tasks(client)
287
287
end
288
288
end
289
289
290
+ def skippable_task? ( task )
291
+ names = [ 'health-node' , 'cluster:monitor/tasks/lists' , 'create-index-template-v2' ,
292
+ 'remove-component-template' ]
293
+ if task . is_a? ( String )
294
+ names . select { |n | task . match? n } . any?
295
+ elsif task . is_a? ( Hash )
296
+ names . select { |n | task [ 'source' ] . match? n } . any?
297
+ end
298
+ end
299
+
290
300
def delete_all_ilm_policies ( client )
291
301
policies = client . ilm . get_lifecycle
292
302
policies . each do |policy |
You can’t perform that action at this time.
0 commit comments