Skip to content

Conversation

@ManickaP
Copy link
Member

@ManickaP ManickaP commented Aug 5, 2025

Fixes #118314

Copilot AI review requested due to automatic review settings August 5, 2025 17:41
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes a test that was expecting the wrong exception type when attempting to disconnect a socket that isn't connected. The change corrects the expected exception from InvalidOperationException to SocketException and removes the ActiveIssue attribute that was tracking this problem.

Key Changes

  • Updates test expectation to match actual socket behavior
  • Removes ActiveIssue tracking since the issue is now resolved
Comments suppressed due to low confidence (1)

src/libraries/System.Net.Sockets/tests/FunctionalTests/DisconnectTest.cs:79

  • The test method name should be updated to reflect the correct exception type. Consider renaming to Disconnect_NotConnected_ThrowsSocketException to match the actual behavior being tested.
        public async Task Disconnect_NotConnected_ThrowsSocketException(bool reuseSocket)

@dotnet-policy-service
Copy link
Contributor

Tagging subscribers to this area: @dotnet/ncl
See info in area-owners.md if you want to be subscribed.

Copy link
Member

@wfurt wfurt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ManickaP ManickaP merged commit cda16fd into dotnet:main Aug 6, 2025
79 of 82 checks passed
@ManickaP ManickaP deleted the socket-test branch August 6, 2025 06:56
@github-actions github-actions bot locked and limited conversation to collaborators Sep 5, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Disconnect_NotConnected_ThrowsInvalidOperationException throws wrong exception

4 participants