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
{{ message }}
Repository navigation
task(tooling): detect pending Hive box opens before they hang later tests #9053
Strengthen the merged-test-process Hive harness so a test cannot leave a pending Hive.openBox future hidden by name and make a later, unrelated test wait until timeout.
The harness should either await pending opens during root teardown or fail promptly with enough attribution to identify the suite that started the open. Hive.isBoxOpen is insufficient because it cannot see Hive’s private registry of in-flight opens.
Context
PR #9050 fixes the current leak by overriding hashtagServiceProvider in the hashtag route test, but deliberately leaves this harness gap unchanged. Closing #9022 without this task would leave the systemic protection untracked.
This failure class has recurred through #6748, #6859, #7254, and #9022. A prior point fix closed #7254 without filing the deferred guard work; the gap later had to be rediscovered while addressing #6748. #8748 tracks the related but distinct Hive home-directory global.
Investigate a test-owned wrapper or other supported seam that records every Hive.openBox future; do not depend blindly on Hive private internals.
Give root teardown visibility into pending opens so it can await completion or fail with the originating test/suite and box name.
Preserve the existing heal-and-blame behavior for boxes that are already open.
Cover production providers that widget tests can accidentally mount, including the people-lists repository path, without requiring a per-provider deny-list.
Acceptance Criteria
A regression test demonstrates that a stranded openBox is detected before an unrelated later test times out.
The failure identifies the originating suite and box name, or teardown safely awaits and clears the pending open.
Existing Hive cleanup behavior remains covered and passing.
A guard or shared test API prevents new untracked direct opens in merged widget-test processes where feasible.
The relevant focused tests, all four test shards, Analyze, Format, and generated-file checks pass.
Testing
Recreate the two-file merged-process reproduction documented in #9050: run the leaking route test before cache_recovery_service_test.dart in one process and verify the harness catches or resolves the pending open without either cache-recovery test reaching its timeout.
Activity