Handle timeout issue in test case