Tests: move asserts to the finish function and reduce number of wait/resume.