Skip to content
This repository was archived by the owner on Jan 5, 2026. It is now read-only.

[#6624] port: [#4452][#4456][#4460][botframework-streaming] Should reject pending requests on disconnection#6627

Merged
tracyboehrer merged 1 commit into
mainfrom
southworks/add/websocket-reject-all-pending-requests
May 8, 2023
Merged

[#6624] port: [#4452][#4456][#4460][botframework-streaming] Should reject pending requests on disconnection#6627
tracyboehrer merged 1 commit into
mainfrom
southworks/add/websocket-reject-all-pending-requests

Conversation

@ceciliaavila
Copy link
Copy Markdown
Collaborator

Fixes #6624

Description

This PR ports the changes from PR#4461 to reject all pending requests when the websocket is disconnected.

Specific Changes

  • Added new RejectAllResponses method in RequestManager class.
  • Added call to RejectAllResponses in OnConnectionDisconnected of WebSocketClient.
  • Added a unit test to cover the new method in RequestManagerTests.
  • Refactored WebSocketTransportTests to follow the implementation in JS:
    • Move WebSocketClient and WebSocketServer tests to the new class WebSocketClientServerTests.
    • Move the FauxSock class to the Utilities folder for reuse by the test classes.

Testing

These images show the pending requests being rejected after the fix and the new unit tests passing.
image

image

@ceciliaavila ceciliaavila added the Automation: No parity PR does not need to be applied to other languages. label May 2, 2023
@ceciliaavila ceciliaavila requested a review from a team as a code owner May 2, 2023 13:38
@coveralls
Copy link
Copy Markdown
Collaborator

Pull Request Test Coverage Report for Build 349985

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 4 unchanged lines in 3 files lost coverage.
  • Overall coverage decreased (-0.003%) to 79.09%

Files with Coverage Reduction New Missed Lines %
/libraries/AdaptiveExpressions/BuiltinFunctions/GetNextViableTime.cs 1 90.91%
/libraries/AdaptiveExpressions/BuiltinFunctions/GetPreviousViableTime.cs 1 90.91%
/libraries/Microsoft.Bot.Streaming/Transport/WebSocket/WebSocketClient.cs 2 78.87%
Totals Coverage Status
Change from base Build 349053: -0.003%
Covered Lines: 25830
Relevant Lines: 32659

💛 - Coveralls

@BruceHaley
Copy link
Copy Markdown
Contributor

✔️ No Binary Compatibility issues for Microsoft.Bot.Streaming.dll

@tracyboehrer tracyboehrer merged commit 33c955a into main May 8, 2023
@tracyboehrer tracyboehrer deleted the southworks/add/websocket-reject-all-pending-requests branch May 8, 2023 19:43
This was referenced May 14, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Automation: No parity PR does not need to be applied to other languages.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

port: [#4452][#4456][#4460][botframework-streaming] Should reject pending requests on disconnection

4 participants