Add tests for async close