add test_finished function to manage TIMES at the end of the test