Skip to content

Fix test tracking when ranges are deleted - #5834

Merged
DanTup merged 2 commits into
masterfrom
fix-test-tracking-for-deletes
Dec 4, 2025
Merged

DanTup merged 2 commits into
masterfrom
fix-test-tracking-for-deletes

Conversation

@DanTup

@DanTup DanTup commented Dec 4, 2025

Copy link
Copy Markdown
Member

When processing changes, we were firing the callbacks in-line while enumerating the trackers. A deleted position could result in a tracked range from disposing itself (the start position is deleted first, and it then disposes and untracks the end position) which modified the list of trackers while we were enumerating.

To fix, we store up the callbacks so nothing is modified while we synchronously process the changes.

Fixes #5831

When processing changes, we were firing the callbacks in-line while enumerating the trackers. A deleted position could result in a tracked range from disposing itself (the start position is deleted first, and it then disposes and untracks the end position) which modified the list of trackers while we were enumerating.

To fix, we store up the callbacks so nothing is modified while we synchronously process the changes.

Fixes #5831
@DanTup DanTup added this to the v3.126.0 milestone Dec 4, 2025
@DanTup DanTup added is bug fix in testing Relates to test execution of Dart/Flutter tests for end users labels Dec 4, 2025
@DanTup
DanTup requested a review from Copilot December 4, 2025 16:47
@DanTup

DanTup commented Dec 4, 2025

Copy link
Copy Markdown
Member Author

@codex review

/gemini review

@gemini-code-assist

Copy link
Copy Markdown

I've received your request for a code review via /gemini review. I am now processing the review and will post it shortly. Please note that @codex review is not a recognized command. If you intended to trigger a code review, please use /gemini review.

chatgpt-codex-connector[bot]

This comment was marked as resolved.

This comment was marked as resolved.

@DanTup
DanTup merged commit 758a6b4 into master Dec 4, 2025
18 checks passed
@DanTup
DanTup deleted the fix-test-tracking-for-deletes branch December 4, 2025 17:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

in testing Relates to test execution of Dart/Flutter tests for end users is bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Deleting a test results in the next test marker moving to the wrong line

2 participants