Repository navigation
Conversation
A speed test only stored a speed above zero, so a node that was skipped because its delay test failed, or whose download failed, kept the speed of the previous run. The list showed the skip or error text until it was sorted or refreshed; then the old speed came back and the node sorted as if it had been measured. Clear the stored speed when a speed or mixed test starts.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #10405
When a node's speed test is skipped because its delay test failed, or its download fails, the list shows the skip or error text, but the node keeps the speed it got in an earlier run.
DoSpeedTestonly stores a speed above zero, and nothing resets the old value. The list is rebuilt from the stored values, so after clicking the Speed column (or any refresh) the old speed comes back and the node sorts as if it had been measured. That is the case in #10405: test once with a working connection, test again offline, then sort by speed.The fix clears the stored speed in
SetTestResultAsyncwhen a speed test or a mixed test starts, where the display is already reset to "testing". Measured speeds are stored as before. A node without a result now shows its skip or error message after a rebuild (SpeedValfalls back to the message when the speed is 0) and sorts to the end with the other untested nodes. Delay results are not touched.Tests:
SpeedtestServiceResultTestsstores an old speed, starts a speed test, a mixed test and a real-ping test throughSetTestResultAsync, and checks that only the two speed tests clear it. Without the fix the speed and mixed cases fail.dotnet test ServiceLib.Tests: 139 passed on macOS arm64 with .NET 10.0.402.