File tree Expand file tree Collapse file tree 2 files changed +10
-3
lines changed Expand file tree Collapse file tree 2 files changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -548,7 +548,7 @@ class TestContext {
548
548
_client? .close ();
549
549
await _outputDir? .delete (recursive: true );
550
550
stopLogWriter ();
551
- project.tearDown ();
551
+ await project.tearDown ();
552
552
553
553
// clear the state for next setup
554
554
_webDriver = null ;
Original file line number Diff line number Diff line change @@ -252,9 +252,16 @@ class TestProject {
252
252
}
253
253
254
254
/// Delete the project if we made a copy.
255
- void tearDown () {
255
+ Future < void > tearDown () async {
256
256
if (editable) {
257
- _fixturesCopy.deleteSync (recursive: true );
257
+ try {
258
+ _fixturesCopy.deleteSync (recursive: true );
259
+ } on FileSystemException catch (_) {
260
+ // On Windows, the build daemon process might still be accessing the
261
+ // working directory, so wait a second and then try again.
262
+ await Future .delayed (const Duration (seconds: 1 ));
263
+ _fixturesCopy.deleteSync (recursive: true );
264
+ }
258
265
}
259
266
}
260
267
You can’t perform that action at this time.
0 commit comments