You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Unit test ValidateHttpListenerRedirectUriAsync is flaky and intermittently fails with a connection refused error when attempting to send a request to localhost. This occurs because the HTTP listener is not always fully initialized before the test attempts to send a request.
Solution
Ensure the listener is ready before sending the request.
Use Task.WhenAny(listenTask, Task.Delay(5000)) to check if the listener completes within the timeout.
Introduce a small delay (await Task.Delay(500)) before sending the request to allow the listener to start properly.
The text was updated successfully, but these errors were encountered:
Task type
Test
Description
Unit test ValidateHttpListenerRedirectUriAsync is flaky and intermittently fails with a connection refused error when attempting to send a request to localhost. This occurs because the HTTP listener is not always fully initialized before the test attempts to send a request.
Solution
Ensure the listener is ready before sending the request.
Use Task.WhenAny(listenTask, Task.Delay(5000)) to check if the listener completes within the timeout.
Introduce a small delay (await Task.Delay(500)) before sending the request to allow the listener to start properly.
The text was updated successfully, but these errors were encountered: