Skip to content

Commit 1b84db7

Browse files
authored
CI-Fix: make resurrection test resilient to timing/race conditions in CI (#1233)
1 parent 197303a commit 1b84db7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

spec/unit/outputs/elasticsearch/http_client/pool_spec.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,8 @@ def body
331331

332332
expect(subject.url_meta(u)[:state]).to eql(:dead)
333333
sleep subject.resurrect_delay + 1
334-
expect(subject.url_meta(u)[:state]).to eql(:alive)
334+
# try a few times with exponential backoff as timing is not 100% guaranteed during CI execution.
335+
try(10) { expect(subject.url_meta(u)[:state]).to eql(:alive) }
335336
end
336337
end
337338
end

0 commit comments

Comments
 (0)