Address flakes from using temp directory to run tests #2649
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.
2172ba7 added support to run tests in a temporary directory.
This results in two flaky issues:
temp directory because the process may have not been torn
down yet, so it may still be accessing the file system.
There was an initial retry after 1 second, but that appears
to be not enough looking at a recent test run. See https://github.com/dart-lang/webdev/actions/runs/16157459808/job/45602784802?pr=2649
for an example. It's printed as a warning.
this case, the ResidentWebRunner in frontend_server may not
restore the current directory in the LocalFileSystem. This
leads to cascading failures in subsequent tests due to no
longer being in a path that contains 'webdev'. See
https://github.com/dart-lang/webdev/actions/runs/15989286213/job/45099373212?pr=2641
for an example. See tearDown is not called if a test times out test#897
as well for tracking work to call tearDown on timeouts.
To address the above issues:
only occurs on Windows.
utilities.dart with the same (correct) value every time.