Added timeout handling for resolution and improved unit test
Added random trials for tsting timeout