added waitFor to search tests