Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(249)

Unified Diff: pkg/analysis_server/test/domain_analysis_test.dart

Issue 1167483004: Invalidate resolution of analysisOptions/sourceFactory changes. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: pkg/analysis_server/test/domain_analysis_test.dart
diff --git a/pkg/analysis_server/test/domain_analysis_test.dart b/pkg/analysis_server/test/domain_analysis_test.dart
index 1323430b04d7157e77d21db1045e3fe42c2c5f3d..25b4d88125e57f0ff5e9b90316a6ef20b88a0c79 100644
--- a/pkg/analysis_server/test/domain_analysis_test.dart
+++ b/pkg/analysis_server/test/domain_analysis_test.dart
@@ -287,7 +287,7 @@ class AnalysisDomainTest extends AbstractAnalysisTest {
}
}
- test_packageMapDependencies() {
+ test_packageMapDependencies() async {
// Prepare a source file that has errors because it refers to an unknown
// package.
String pkgFile = '/packages/pkgA/libA.dart';
@@ -305,19 +305,18 @@ f(A a) {
packageMapProvider.dependencies.add(pkgDependency);
// Create project and wait for analysis
createProject();
- return waitForTasksFinished().then((_) {
- expect(filesErrors[testFile], isNotEmpty);
- // Add the package to the package map and tickle the package dependency.
- packageMapProvider.packageMap = {
- 'pkgA': [resourceProvider.getResource('/packages/pkgA')]
- };
- resourceProvider.modifyFile(pkgDependency, 'new contents');
- // Give the server time to notice the file has changed, then let
- // analysis complete. There should now be no error.
- return pumpEventQueue().then((_) => waitForTasksFinished()).then((_) {
- expect(filesErrors[testFile], isEmpty);
- });
- });
+ await waitForTasksFinished();
+ expect(filesErrors[testFile], isNotEmpty);
+ // Add the package to the package map and tickle the package dependency.
+ packageMapProvider.packageMap = {
+ 'pkgA': [resourceProvider.getResource('/packages/pkgA')]
+ };
+ resourceProvider.modifyFile(pkgDependency, 'new contents');
+ // Give the server time to notice the file has changed, then let
+ // analysis complete. There should now be no error.
+ await pumpEventQueue();
+ await waitForTasksFinished();
+ expect(filesErrors[testFile], isEmpty);
}
test_setRoots_packages() {
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/context/context.dart » ('j') | pkg/analyzer/lib/src/generated/engine.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698