added delay to second thread in unit test