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

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

Issue 1542433002: (TBR) "fix" test_no_duplicate_notifications (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 319 matching lines...) Expand 10 before | Expand all | Expand 10 after
330 <AnalysisService, Set<String>>{}; 330 <AnalysisService, Set<String>>{};
331 for (AnalysisService service in AnalysisService.VALUES) { 331 for (AnalysisService service in AnalysisService.VALUES) {
332 subscriptions[service] = <String>[bar.path].toSet(); 332 subscriptions[service] = <String>[bar.path].toSet();
333 } 333 }
334 server.setAnalysisSubscriptions(subscriptions); 334 server.setAnalysisSubscriptions(subscriptions);
335 await pumpEventQueue(1000); 335 await pumpEventQueue(1000);
336 expect(server.statusAnalyzing, isFalse); 336 expect(server.statusAnalyzing, isFalse);
337 channel.notificationsReceived.clear(); 337 channel.notificationsReceived.clear();
338 server.updateContent( 338 server.updateContent(
339 '0', {bar.path: new AddContentOverlay('library bar; void f() {}')}); 339 '0', {bar.path: new AddContentOverlay('library bar; void f() {}')});
340 await pumpEventQueue(500); 340 await pumpEventQueue(1000);
341 expect(server.statusAnalyzing, isFalse); 341 expect(server.statusAnalyzing, isFalse);
342 expect(channel.notificationsReceived, isNotEmpty); 342 expect(channel.notificationsReceived, isNotEmpty);
343 Set<String> notificationTypesReceived = new Set<String>(); 343 Set<String> notificationTypesReceived = new Set<String>();
344 for (Notification notification in channel.notificationsReceived) { 344 for (Notification notification in channel.notificationsReceived) {
345 String notificationType = notification.event; 345 String notificationType = notification.event;
346 switch (notificationType) { 346 switch (notificationType) {
347 case 'server.status': 347 case 'server.status':
348 case 'analysis.errors': 348 case 'analysis.errors':
349 // It's normal for these notifications to be sent multiple times. 349 // It's normal for these notifications to be sent multiple times.
350 break; 350 break;
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
565 _MockServerOperation(this.context); 565 _MockServerOperation(this.context);
566 566
567 @override 567 @override
568 ServerOperationPriority get priority => ServerOperationPriority.ANALYSIS; 568 ServerOperationPriority get priority => ServerOperationPriority.ANALYSIS;
569 569
570 @override 570 @override
571 void perform(AnalysisServer server) { 571 void perform(AnalysisServer server) {
572 isComplete = true; 572 isComplete = true;
573 } 573 }
574 } 574 }
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