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

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

Issue 807993002: Ensure that AnalysisContext futures are completed when context disposed. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Handle case of computeAsync called after dispose Created 6 years 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
« no previous file with comments | « pkg/analysis_server/lib/src/analysis_server.dart ('k') | pkg/analyzer/lib/src/generated/engine.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analysis_server/test/analysis_server_test.dart
diff --git a/pkg/analysis_server/test/analysis_server_test.dart b/pkg/analysis_server/test/analysis_server_test.dart
index 6e7ada51830e301a39fffb4a083cd98dacb032a5..6355ccf35e3de538434fd75b5d34f2d18dcddbe2 100644
--- a/pkg/analysis_server/test/analysis_server_test.dart
+++ b/pkg/analysis_server/test/analysis_server_test.dart
@@ -48,6 +48,19 @@ class AnalysisServerTest {
rethrowExceptions: true);
}
+ Future test_contextDisposed() {
+ resourceProvider.newFolder('/foo');
+ resourceProvider.newFile('/foo/bar.dart', 'library lib;');
+ server.setAnalysisRoots('0', ['/foo'], [], {});
+ AnalysisContext context;
+ return pumpEventQueue().then((_) {
+ context = server.getAnalysisContext('/foo/bar.dart');
+ server.setAnalysisRoots('1', [], [], {});
+ }).then((_) => pumpEventQueue()).then((_) {
+ expect(context.isDisposed, isTrue);
+ });
+ }
+
Future test_contextsChangedEvent() {
resourceProvider.newFolder('/foo');
« no previous file with comments | « pkg/analysis_server/lib/src/analysis_server.dart ('k') | pkg/analyzer/lib/src/generated/engine.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698