improve test for async control flow