Fix endless test wait