Fix flaky test by changing catch and adding sleep