callback must be called at the end of test