update test case, remove pause and add waitFor.