Add test for deferred peer close.