Skip to content

test(recovery): fix hanging retry test that stalls Tests (rest) - #1389

Merged
ZhuchkaTriplesix merged 1 commit into
devfrom
fix/recovery-test-real-io-hang
Oct 10, 2026
Merged

ZhuchkaTriplesix merged 1 commit into
devfrom
fix/recovery-test-real-io-hang

Conversation

@ZhuchkaTriplesix

@ZhuchkaTriplesix ZhuchkaTriplesix commented Oct 10, 2026 •

Copy link
Copy Markdown
Member

Problem

`Tests (rest)` has been timing out after ~12 minutes on every run since #1382 landed in `dev`. The only failing test is
`querya_startup_recovery_app_test.dart: QueryaStartupRecoveryApp widget retry callback triggers when database can be opened`
(`Test timed out after 10 minutes`). All other 508 tests in the section pass.

Cause

The test is a `testWidgets` (FakeAsync) but awaits real I/O directly: `LocalDb.close()`, `File.exists()/delete()`, and the
Retry handler's `LocalDb.open()` (sqflite ffi). Real I/O never completes in FakeAsync without `tester.runAsync`, so the test hangs.

Fix

  • Do the DB/file preparation inside `tester.runAsync`.
  • After tapping Retry, wait inside `runAsync` (bounded, 10s) until the callback fires, then `pump()`.
  • Add `timeout: 30s` so a regression fails fast instead of consuming the 10 minute default.

Test-only change; not run locally, CI is the check.

The retry widget test awaited real file and SQLite I/O inside FakeAsync,
which never completes, so Tests (rest) stalled until the 10 minute test
timeout on every PR. Do the I/O in tester.runAsync, wait for the retry
callback there, and add a 30s test timeout so a regression fails fast.
@ZhuchkaTriplesix
ZhuchkaTriplesix merged commit 1aeb1c6 into dev Oct 10, 2026
13 checks passed
@ZhuchkaTriplesix
ZhuchkaTriplesix deleted the fix/recovery-test-real-io-hang branch October 11, 2026 15:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant