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

Side by Side Diff: pkg/analysis_server/test/integration/integration_tests.dart

Issue 789603007: Stop sending unwanted status and fix integration tests (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « pkg/analysis_server/lib/src/analysis_server.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library test.integration.analysis; 5 library test.integration.analysis;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:collection'; 8 import 'dart:collection';
9 import 'dart:convert'; 9 import 'dart:convert';
10 import 'dart:io'; 10 import 'dart:io';
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 * multiple times in one test; each time it is used it will wait afresh for 112 * multiple times in one test; each time it is used it will wait afresh for
113 * analysis to finish. 113 * analysis to finish.
114 */ 114 */
115 Future get analysisFinished { 115 Future get analysisFinished {
116 Completer completer = new Completer(); 116 Completer completer = new Completer();
117 StreamSubscription subscription; 117 StreamSubscription subscription;
118 // This will only work if the caller has already subscribed to 118 // This will only work if the caller has already subscribed to
119 // SERVER_STATUS (e.g. using sendServerSetSubscriptions(['STATUS'])) 119 // SERVER_STATUS (e.g. using sendServerSetSubscriptions(['STATUS']))
120 expect(_subscribedToServerStatus, isTrue); 120 expect(_subscribedToServerStatus, isTrue);
121 subscription = onServerStatus.listen((ServerStatusParams params) { 121 subscription = onServerStatus.listen((ServerStatusParams params) {
122 if (!params.analysis.isAnalyzing) { 122 if (params.analysis != null && !params.analysis.isAnalyzing) {
123 completer.complete(params); 123 completer.complete(params);
124 subscription.cancel(); 124 subscription.cancel();
125 } 125 }
126 }); 126 });
127 return completer.future; 127 return completer.future;
128 } 128 }
129 129
130 /** 130 /**
131 * Print out any messages exchanged with the server. If some messages have 131 * Print out any messages exchanged with the server. If some messages have
132 * already been exchanged with the server, they are printed out immediately. 132 * already been exchanged with the server, they are printed out immediately.
(...skipping 733 matching lines...) Expand 10 before | Expand all | Expand 10 after
866 void populateMismatches(item, List<MismatchDescriber> mismatches); 866 void populateMismatches(item, List<MismatchDescriber> mismatches);
867 867
868 /** 868 /**
869 * Create a [MismatchDescriber] describing a mismatch with a simple string. 869 * Create a [MismatchDescriber] describing a mismatch with a simple string.
870 */ 870 */
871 MismatchDescriber simpleDescription(String description) => 871 MismatchDescriber simpleDescription(String description) =>
872 (Description mismatchDescription) { 872 (Description mismatchDescription) {
873 mismatchDescription.add(description); 873 mismatchDescription.add(description);
874 }; 874 };
875 } 875 }
OLDNEW
« no previous file with comments | « pkg/analysis_server/lib/src/analysis_server.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698