[Home]

Summary:ASTERISK-25611: core: threadpool thread_timeout_thrash unit test sporadically failing
Reporter:Joshua C. Colp (jcolp)Labels:
Date Opened:2015-12-04 09:18:48.000-0600Date Closed:2016-01-19 19:39:53.000-0600
Priority:MajorRegression?No
Status:Closed/CompleteComponents:Tests/General
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:
Description:As shown at https://jenkins.asterisk.org/jenkins/job/check-asterisk/1520/testReport/junit/%28root%29/AsteriskUnitTests/_main_threadpool_thread_timeout_thrash/ this test is sporadically failing. Identify why (it may be a unit test problem itself) and fix it.
Comments:By: Joshua C. Colp (jcolp) 2015-12-04 09:28:13.884-0600

I've isolated this to the unit test itself. Due to a condition in the threadpool implementation it is possible for there to be 0 active and 0 idle threads before the last task is handled. What will end up happening is that a new active thread is started to handle the last task. Since the unit test considers everything done when 0 active and 0 idle is reached at the end the end state is tested prematurely, causing it to state that 29 tasks were pushed instead of 30 when in reality shortly after the message is output the last task is handled.