commit | 1533dda6f4738a23c48d57aed3601f8ba8d5a835 | [log] [tgz] |
---|---|---|
author | Hayden Nix <haydennix@google.com> | Tue Jan 28 13:09:46 2025 -0800 |
committer | CQ Bot <fuchsia-internal-scoped@luci-project-accounts.iam.gserviceaccount.com> | Tue Jan 28 13:09:46 2025 -0800 |
tree | b51530644cbdef879d591037537cf6f42849db73 | |
parent | b1778aa7ad80cfe2feeb7ae6f1d7bd773e95912a [diff] |
[wlan][policy] Fix timer wake flake This change addresses a flake where some scan tests expect to wake a pending timer and it does not exist. These tests use an executor with real clock time, and because the timers are only 100ms, it is possible (though unlikely, hence the infrequency of the flake) for that time to have passed and the timer to have already awaken. This was confirmed by making the timer even shorter and then reproducing the test failure. This fix changes those scan tests that use `exec.wake_next_timer()` to use `TestExecutor::new_with_fake_time`. This guarantees the timers won't awake early. It also adds a helper method `run_until_completion` to replace the `run_singlethreaded` usage in those tests. Bug: 388671184 Test: fx test wlancfg-tests Multiply: wlancfg-tests Change-Id: Ia5040a3264df0ad348023e48dc0137014043ae1a Reviewed-on: https://fuchsia-review.googlesource.com/c/fuchsia/+/1194216 Commit-Queue: Auto-Submit <auto-submit@fuchsia-infra.iam.gserviceaccount.com> Reviewed-by: Marc Khouri <mnck@google.com> Fuchsia-Auto-Submit: Hayden Nix <haydennix@google.com>
Fuchsia is an open source, general purpose operating system supporting modern 64-bit Intel and ARM processors.
We expect everyone interacting with our project to respect our code of conduct.
Read more about Fuchsia's principles.
See Getting Started.
See fuchsia.dev.