Closed sw-joelmut closed 9 months ago
@sw-joelmut It appears some Microsoft.Bot.Connector.Streaming.Tests are failing.
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.Connector.Streaming/Application/TimerAwaitable.cs | 1 | 68.25% | ||
/libraries/Microsoft.Bot.Connector.Streaming/Session/StreamingSession.cs | 17 | 91.2% | ||
<!-- | Total: | 20 | --> |
Totals | |
---|---|
Change from base Build 369561: | 0.004% |
Covered Lines: | 24147 |
Relevant Lines: | 32873 |
:heavy_check_mark: No Binary Compatibility issues for Microsoft.Bot.Streaming.dll
@sw-joelmut It appears some Microsoft.Bot.Connector.Streaming.Tests are failing.
Changes applied, and updated the PR's description, thanks!
Fixes #6683
Description
This PR fixes an issue where, while using DLASE, the bot threw a timeout issue while streaming, due to not generating a response in the initial request. Therefore, if the streaming process in the initial request takes longer than 15 seconds to finalize and generate a response, the bot will throw a timeout issue. Sending a response (
HTTP 202 (Accepted)
) before starting to process all streaming requests addressed the issue and will not generate a timeout issue.Specific Changes
SendResponseAsync
call to theStreamingSession
class to send an HTTP 202 (Accepted) response before starting processing all streaming information.Accepted
StatusCode condition toProtocolAdapter
for Streaming andStreamingSession
for Connector.Streaming. This allows to detect when the Accepted response is taking place and can proceed to ignore the response and let the actual OK response to be used after streaming.Testing
The following image shows the timeout issue before and after the fix.