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
Stale test markers for dynamic tests come back when using experimentalTestTracking and modifying the test #5734
Describe the behaviour
With the new experimentalTestTracking set to true, I see a weird behaviour in test_reflective_loader test files once I've tried running a debug session that did not complete any tests.
To Reproduce
Steps to reproduce the behavior:
Go to pkg/analysis_server/lib/src/services/correction/dart/add_digit_separators.dart
Add a breakpoint at the first line inside _AddDigitSeparators.compute (at the time of writing is 69)
Go to pkg/analysis_server/test/src/services/correction/assist/add_digit_separators_test.dart
Disable that breakpoint on the breakpoints tab temporarily
Run the full test file
Enable the breakpoint and run the tests
Once it breaks, stop the debugging session
Go back to the test file and see no gutter icons
Add a new line or something like that (some change, I think even whitespaces might do) and see the gutter icons show up
Removing that change will make them go away
Saving the file (even if you delete the change you made - not undoing) will show the gutter icons again
P.S.: With that flag set to false, the gutter icons simply don't show up until you run the tests again (nobody is tracking the tests' positions).
Expected behavior
I'm not sure if this can be fixed here or up on VS Code or what, but I expect it either to never show the gutter icons or to keep showing them.
changed the title [-]New `experimentalTestTracking` flag produces weird behaviour when rerunning tests and none completed[/-][+]Stale test markers for dynamic tests come back when using `experimentalTestTracking` and modifying the test[/+]on Oct 7, 2025
This issue tracks that the icons came back when you modified the file. This is a bug - it's stale data being restored because we didn't clean up the tracking properly when we removed the nodes the first time.
I've opened Don't remove non-outline nodes that don't show up in test runs #5739 to see if we can handle dynamic tests that were not in the set of results you just ran. Currently (without the new tracking), we don't know if you deleted a test, or skipped it (via @soloTest or from stopping early). We assume deleted, since you can always get things back by re-running the whole file. With the new tracking, we might be able to improve that.
Activity
DanTup commentedon Oct 7, 2025
Slightly simpler repro:
The test results for tests after the one we stopped on vanish.
Edit:
The reason this happens is that we think this test has been deleted, because you run the tests and it was no longer in the results:
Need to rethink this...
It also doesn't explain why the tests come back though. Is it because the tracker is restoring them?
[-]New `experimentalTestTracking` flag produces weird behaviour when rerunning tests and none completed[/-][+]Stale test markers for dynamic tests come back when using `experimentalTestTracking` and modifying the test[/+]DanTup commentedon Oct 7, 2025
I'm splitting this into two issues.
This issue tracks that the icons came back when you modified the file. This is a bug - it's stale data being restored because we didn't clean up the tracking properly when we removed the nodes the first time.
I've opened Don't remove non-outline nodes that don't show up in test runs #5739 to see if we can handle dynamic tests that were not in the set of results you just ran. Currently (without the new tracking), we don't know if you deleted a test, or skipped it (via
@soloTestor from stopping early). We assume deleted, since you can always get things back by re-running the whole file. With the new tracking, we might be able to improve that.