When celery_chord was introduced to process CTS/VTS tests, it added a bug in SQUAD that makes build finished events to get triggered before all testjobs' results to be fetched completely.
The main thread triggers many subtasks via celery_chord and returns right away, with all subtasks offloaded to the queue.
With the main thread returned, SQUAD would consider the postprocessing of tradefed plugin to be done and events would be triggered, like build callbacks.
This patch adds a while loop in the main thread to wait for its parallel subtasks to finish.
When celery_chord was introduced to process CTS/VTS tests, it added a bug in SQUAD that makes build finished events to get triggered before all testjobs' results to be fetched completely.
The main thread triggers many subtasks via celery_chord and returns right away, with all subtasks offloaded to the queue.
With the main thread returned, SQUAD would consider the postprocessing of tradefed plugin to be done and events would be triggered, like build callbacks.
This patch adds a while loop in the main thread to wait for its parallel subtasks to finish.