Make thread safety tests faster