move the ended event to the last test