tests: make threads in punt tests join when finished 75/23275/4
authorAndrew Yourtchenko <ayourtch@gmail.com>
Tue, 5 Nov 2019 18:38:08 +0000 (19:38 +0100)
committerPaul Vinciguerra <pvinci@vinciconsulting.com>
Thu, 7 Nov 2019 11:51:16 +0000 (11:51 +0000)
commit3f8c87132d63c14f1ba90d7db6cf2a2aba0f8cb9
treeec6885017da6d0779bd58a92379c5715432f3e84
parentcf4c2102d9dc3ccc939cca1137b24a75341f1b0c
tests: make threads in punt tests join when finished

The 42693521f6046997133c8f63bcfc9d615d96f69d added the timeout
to the child process join + print the name of the offending
child process.

Upon testing the issue furher, appeared the offenders were
always the same - punt tests. The processes running them
were stuck trying to acquire lock, even if all
the user-accessible execution has finished. Some searching
revealed that one needs to tread carefully when dealing
with Thread and Multiprocessing at the same time.

punt tests used threads but did not call thread.join. Somehow
it worked in some cases but not the others. This fix makes
the threads exit cleanly - which also makes the timeouts
waiting for the process to join disappear.

Type: test
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
Change-Id: I05d99bb48a9987544bbfe45118755c09d7867aa0
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
test/test_punt.py