public void SendAsync_MultipleCallsWithDispose_NoHandleLeaksManuallyVerifiedUsingLogging() { WinHttpHandler handler; HttpResponseMessage response; for (int i = 0; i < 50; i++) { handler = new WinHttpHandler(); response = SendRequestHelper.Send(handler, () => { }); response.Dispose(); handler.Dispose(); } }
public void SendAsync_MultipleCallsWithDispose_NoHandleLeaks() { WinHttpHandler handler; HttpResponseMessage response; for (int i = 0; i < 50; i++) { handler = new WinHttpHandler(); response = SendRequestHelper(handler, () => { }); response.Dispose(); handler.Dispose(); } FakeSafeWinHttpHandle.ForceGarbageCollection(); Assert.Equal(0, FakeSafeWinHttpHandle.HandlesOpen); }