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
The test `test_process_client_handling_stream_request_latest_voters_snapshot`
occasionally fails currently in an inconsistent manner. This tests doesn't match the
cleanup steps of the other tests. As a result it makes this test susceptible to async
task scheduling differences between runs.
In general the tasks being tested are considered "critical" and so such failures need
to result in a `panic!` if they occur. However, with async-std's tasks such panics
cannot be easily intercepted / caught, especially with how they are spawned by the
program with `InternalClientMessageProcessingTask::new`. So if the channels that
supply the task with the information coming in get `drop`ed and then the task attempts
to consume them, a panic will result.
The solution to this is to cancel the task as part of the test before the channels are
dropped. This will ensure that the task itself no longer gets scheduled, and the
panic is avoided.
0 commit comments