Wait for task completion in IndexLifecycleRunnerTests#94901
Conversation
These tests submit tasks to the master service and wait for the state to be applied, but not for the publication to complete, and without that wait they may clean up too soon. This commit makes them wait for the master service to finish its work before cleaning up. Relates elastic#94325 Closes elastic#94900
|
Pinging @elastic/es-data-management (Team:Data Management) |
gmarouli
left a comment
There was a problem hiding this comment.
Thank you for fixing this @DaveCTurner, much appreciated. LGTM, I have one comment and a nit :).
As I was going through the change I noticed one more attempt to close things at line 309. Should we add it there too?
Nit: This test already has a set up and a tear down method, I am wondering if we could use them instead of doing the same things in many of these tests. I am happy to look into this as a follow up of this PR, if you think it's a good idea.
Thanks, yes I think that makes sense too. Added in 980f90e. |
Yes please. In fact I think that it'd be simpler if most of these tests just waited for the master service to complete its work instead of using the per-task latch as done at the moment. |
Makes sense, I will look into it. |
These tests submit tasks to the master service and wait for the state to be applied, but not for the publication to complete, and without that wait they may clean up too soon. This commit makes them wait for the master service to finish its work before cleaning up.
Relates #94325
Closes #94900