Repository navigation
test(e2e): let database requests finish before the harness advances time - #1206
Merged
Merged
Conversation
The harness closes an app by advancing the fake clock in 10 s steps. A database request still in flight then trips sqflite's 10 s "database has been locked" warning, eleven times per run in the smoke and palette suites. The app holds no lock there, so the warning is noise: the harness now lets real requests finish before it advances the fake clock.
ZhuchkaTriplesix
force-pushed
the
issue/db-locked-warning
branch
from
October 9, 2026 08:29
87beec0 to
5a57138
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why the warning appeared
CI logs show
database has been locked for 0:00:10eleven times in the smoke and command-palette e2e suites. sqflite prints it when a database operation waits on the lock for ten seconds.Checked against the code:
LocalDb.updateConnection, and it uses the transaction object correctly. Nothing holds the lock for ten seconds.E2eAppHarness.close. It advances the fake clock in ten-second steps. A database request still in flight at that moment has its ten-second timer fire on the fake clock, so the warning appears although the real request is fine.Changes
closelets the real requests finish (runAsync, 500 ms) before it advances the fake clock.Not verified locally
Tests were not run locally, per the project rule. The expectation is that the warning disappears from the CI log. If it stays, the cause is not the harness and the investigation continues.