Fix the test that want to run async code to be async.
R=brianwilkerson@google.com
Change-Id: Ia428ac71dd7a0e86daf4542d256fa6ffee3a65b5
Reviewed-on: https://dart-review.googlesource.com/57900
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
diff --git a/pkg/analyzer/test/src/dart/analysis/driver_test.dart b/pkg/analyzer/test/src/dart/analysis/driver_test.dart
index 2242306..da10edf 100644
--- a/pkg/analyzer/test/src/dart/analysis/driver_test.dart
+++ b/pkg/analyzer/test/src/dart/analysis/driver_test.dart
@@ -570,7 +570,8 @@
// Simulate a change that happens during reading the cached errors.
bool asyncWorkExecuted = false;
- driver.test.workToWaitAfterComputingResult = (path) {
+ driver.test.workToWaitAfterComputingResult = (path) async {
+ await new Future.value(); // the rest will be executed asynchronously
provider.updateFile(path, 'class B');
driver.changeFile(path);
asyncWorkExecuted = true;