Make duration updated after the test is finished