Passing Wait time into polling
fix up test cases