diff --git a/dwds/test/fixtures/project.dart b/dwds/test/fixtures/project.dart index 46bd9193b..9dc8e3def 100644 --- a/dwds/test/fixtures/project.dart +++ b/dwds/test/fixtures/project.dart @@ -240,9 +240,10 @@ class TestProject { try { _fixturesCopy.deleteSync(recursive: true); } on FileSystemException catch (_) { + assert(Platform.isWindows); // On Windows, the build daemon process might still be accessing the - // working directory, so wait a second and then try again. - await Future.delayed(const Duration(seconds: 1)); + // working directory, so wait a few seconds and then try again. + await Future.delayed(const Duration(seconds: 5)); _fixturesCopy.deleteSync(recursive: true); } } diff --git a/test_common/lib/utilities.dart b/test_common/lib/utilities.dart index d4d3619be..1a960a509 100644 --- a/test_common/lib/utilities.dart +++ b/test_common/lib/utilities.dart @@ -12,10 +12,12 @@ const fixturesDirName = 'fixtures'; const newDdcTypeSystemVersion = '3.3.0-242.0.dev'; +final _currentDirectory = p.current; + /// The path to the webdev directory in the local machine, e.g. /// '/workstation/webdev'. String get webdevPath { - final pathParts = p.split(p.current); + final pathParts = p.split(_currentDirectory); assert(pathParts.contains(webdevDirName)); return p.joinAll( pathParts.sublist(0, pathParts.lastIndexOf(webdevDirName) + 1),