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

Side by Side Diff: pkg/analysis_server/test/analysis_server_test.dart

Issue 1508523002: (TBR) increase pumpEventQueue to finish analysis (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 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
« no previous file with comments | « no previous file | 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.analysis_server; 5 library test.analysis_server;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 8
9 import 'package:analysis_server/plugin/protocol/protocol.dart'; 9 import 'package:analysis_server/plugin/protocol/protocol.dart';
10 import 'package:analysis_server/src/analysis_server.dart'; 10 import 'package:analysis_server/src/analysis_server.dart';
(...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after
316 resourceProvider.newFolder('/bar'); 316 resourceProvider.newFolder('/bar');
317 resourceProvider.newFile('/foo/foo.dart', 'import "../bar/bar.dart";'); 317 resourceProvider.newFile('/foo/foo.dart', 'import "../bar/bar.dart";');
318 File bar = resourceProvider.newFile('/bar/bar.dart', 'library bar;'); 318 File bar = resourceProvider.newFile('/bar/bar.dart', 'library bar;');
319 server.setAnalysisRoots('0', ['/foo', '/bar'], [], {}); 319 server.setAnalysisRoots('0', ['/foo', '/bar'], [], {});
320 Map<AnalysisService, Set<String>> subscriptions = 320 Map<AnalysisService, Set<String>> subscriptions =
321 <AnalysisService, Set<String>>{}; 321 <AnalysisService, Set<String>>{};
322 for (AnalysisService service in AnalysisService.VALUES) { 322 for (AnalysisService service in AnalysisService.VALUES) {
323 subscriptions[service] = <String>[bar.path].toSet(); 323 subscriptions[service] = <String>[bar.path].toSet();
324 } 324 }
325 server.setAnalysisSubscriptions(subscriptions); 325 server.setAnalysisSubscriptions(subscriptions);
326 await pumpEventQueue(500); 326 await pumpEventQueue(1000);
327 expect(server.statusAnalyzing, isFalse); 327 expect(server.statusAnalyzing, isFalse);
328 channel.notificationsReceived.clear(); 328 channel.notificationsReceived.clear();
329 server.updateContent( 329 server.updateContent(
330 '0', {bar.path: new AddContentOverlay('library bar; void f() {}')}); 330 '0', {bar.path: new AddContentOverlay('library bar; void f() {}')});
331 await pumpEventQueue(500); 331 await pumpEventQueue(500);
332 expect(server.statusAnalyzing, isFalse); 332 expect(server.statusAnalyzing, isFalse);
333 expect(channel.notificationsReceived, isNotEmpty); 333 expect(channel.notificationsReceived, isNotEmpty);
334 Set<String> notificationTypesReceived = new Set<String>(); 334 Set<String> notificationTypesReceived = new Set<String>();
335 for (Notification notification in channel.notificationsReceived) { 335 for (Notification notification in channel.notificationsReceived) {
336 String notificationType = notification.event; 336 String notificationType = notification.event;
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
556 _MockServerOperation(this.context); 556 _MockServerOperation(this.context);
557 557
558 @override 558 @override
559 ServerOperationPriority get priority => ServerOperationPriority.ANALYSIS; 559 ServerOperationPriority get priority => ServerOperationPriority.ANALYSIS;
560 560
561 @override 561 @override
562 void perform(AnalysisServer server) { 562 void perform(AnalysisServer server) {
563 isComplete = true; 563 isComplete = true;
564 } 564 }
565 } 565 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698