Fix exception calculating run time for lost builds.
When a build is reported as lost, it has no start_time, so the code that calculated the run-time for statsd threw an exception. Correct that by only calculating the run time for jobs that have really completed. Add debug lines to onBuild* that would have helped diagnose this. Keep track of the throwaway threads that are used to report LOST builds so that the test suite can more correctly know when the system is settled. Add a test case for a single non-existent post job. Add STATSD_* env variables in tox to make sure that the statsd code paths are executed by tests. Change-Id: I339443cbad7b0858d70e9180d63dfb701b8eaee9 Reviewed-on: https://review.openstack.org/18792 Reviewed-by: Clark Boylan <firstname.lastname@example.org> Approved: Jeremy Stanley <email@example.com> Reviewed-by: Jeremy Stanley <firstname.lastname@example.org> Tested-by: Jenkinschanges/23/19023/1
Reference in new issue