Unverified Commit 752de494 authored by Alexander Aprelev's avatar Alexander Aprelev Committed by GitHub

Fix hot-restart test by ensuring updated timestmamp is in the future. (#97247)

On Windows modified timestamps are round down to a second, which can lead to missed file updates.

Fixes https://github.com/flutter/flutter/issues/96677
parent 3901aca3
......@@ -55,7 +55,7 @@ void main() {
await Future<void>.delayed(const Duration(milliseconds: 10));
await subscription.cancel();
await flutter.stop();
}, skip: true); // Flake: https://github.com/flutter/flutter/issues/96677
});
testWithoutContext('Hot reload updates background isolates', () async {
final RepeatingBackgroundProject project = RepeatingBackgroundProject();
......
......@@ -51,7 +51,8 @@ class BackgroundProject extends Project {
void updateTestIsolatePhrase(String message) {
final String newMainContents = main.replaceFirst('Isolate thread', message);
writeFile(fileSystem.path.join(dir.path, 'lib', 'main.dart'), newMainContents);
writeFile(fileSystem.path.join(dir.path, 'lib', 'main.dart'), newMainContents,
writeFutureModifiedDate: true);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment