[ffx][update] Deflake test_wait_for_commit

test_wait_for_commit previously relied on a 500ms mock sleep racing
against 1000ms and 50ms warning timers, which could flake under host
load.

Remove the wall-clock race by signaling immediately in the fast-commit
case (with a 60s warning duration) and gating the commit signal on
CommitEvent::Warning via a oneshot channel in the warning case.

Fixed: 583598160
Test: fx bazel test --config=host //src/developer/ffx/plugins/target/update:ffx_update_test --runs_per_test=100
Change-Id: I8cddc3803c2daf458b0c2709290857d29ff3f3ab
Reviewed-on: https://fuchsia-review.googlesource.com/c/fuchsia/+/1974104
Fuchsia-Auto-Submit: Colin Nelson <colnnelson@google.com>
Lint: android-build-ayeaye@system.gserviceaccount.com <android-build-ayeaye@system.gserviceaccount.com>
Commit-Queue: Colin Nelson <colnnelson@google.com>
Agent-Code-Review: Fuchsia CL Risk (Advisory) <groupagent-fuchsia-risk@google.com>
Risk: Fuchsia CL Risk (Advisory) <groupagent-fuchsia-risk@google.com>
Presubmit-Verified: fuchsia-internal-scoped@luci-project-accounts.iam.gserviceaccount.com <fuchsia-internal-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Erick Tryzelaar <etryzelaar@google.com>
1 file changed
tree: 7509912090c64c9cdf12b0393918443b47d480d1
  1. .agents/
  2. .helix/
  3. .mise/
  4. boards/
  5. build/
  6. bundles/
  7. docs/
  8. examples/
  9. manifests/
  10. products/
  11. scripts/
  12. sdk/
  13. src/
  14. third_party/
  15. tools/
  16. zircon/
  17. .clang-format
  18. .clang-tidy
  19. .cursorignore
  20. .dtsfmtrc.toml
  21. .editorconfig
  22. .fx-root
  23. .geminiignore
  24. .git-blame-ignore-revs
  25. .gitattributes
  26. .gitignore
  27. .gitmodules
  28. .gn
  29. .ignore
  30. .watchmanconfig
  31. AGENTS.md
  32. analysis_options.yaml
  33. AUTHORS
  34. BUILD.gn
  35. CODE_OF_CONDUCT.md
  36. CONTRIBUTING.md
  37. fuchsia.code-workspace
  38. LICENSE
  39. OWNERS
  40. PATENTS
  41. pyproject.toml
  42. pyrightconfig.json
  43. README.md
  44. rustfmt.toml
  45. shac.star
  46. shac.textproto
  47. TESTING.json5
README.md

Fuchsia

What is Fuchsia?

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.

How can I build and run Fuchsia?

See Getting Started.

Where can I learn more about Fuchsia?

See fuchsia.dev.