Add default timeout to wait method to avoid
infinite loop

Change-Id: Iefd3db625c6b68d1ee95f121c628fe87ab64bbd2
Closes-Bug: #1349886