fix missing wait in tests