diff --git a/packages/flutter_tools/test/devfs_test.dart b/packages/flutter_tools/test/devfs_test.dart index 63f554a2c4..eb6907dca7 100644 --- a/packages/flutter_tools/test/devfs_test.dart +++ b/packages/flutter_tools/test/devfs_test.dart @@ -3,7 +3,6 @@ // found in the LICENSE file. import 'dart:io'; -import 'dart:async'; import 'package:flutter_tools/src/asset.dart'; import 'package:flutter_tools/src/build_info.dart'; @@ -46,12 +45,12 @@ void main() { file.writeAsBytesSync([1, 2, 3, 4, 5, 6, 7]); await devFS.update(); expect(devFSOperations.contains('writeFile test foo/bar.txt'), isTrue); - // Need to delay between when we first write to a file and when - // we modify it. - await new Future.delayed(new Duration(seconds: 1)); }); testUsingContext('modify existing file on local file system', () async { File file = new File(path.join(basePath, filePath)); + // Set the last modified time to 5 seconds ago. + Process.runSync('touch', ['-A', '-05', file.path]); + await devFS.update(); await file.writeAsBytes([1, 2, 3, 4, 5, 6]); await devFS.update(); expect(devFSOperations.contains('writeFile test bar/foo.txt'), isTrue);