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

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

Issue 352823005: send status notification when analysis starts and ends (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 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/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 66a37d59a23e87e2dfa40c70b44990ed8b0a74cc..495ce4d397183fc12234d4c08f3b8e36c347c5fe 100644
--- a/pkg/analysis_server/test/analysis_server_test.dart
+++ b/pkg/analysis_server/test/analysis_server_test.dart
@@ -50,6 +50,15 @@ main() {
return pumpEventQueue().then((_) {
List<Notification> notifications = helper.channel.notificationsReceived;
expect(notifications, isNot(isEmpty));
+ // expect at least one notification indicating analysis is in progress
+ expect(notifications.any((Notification notification) {
+ if (notification.event == SERVER_STATUS) {
+ Map analysisStatus = notification.params['analysis'];
+ return analysisStatus['analyzing'];
+ }
+ return false;
+ }), isTrue);
+ // the last notification should indicate that analysis is complete
Notification notification = notifications[notifications.length - 1];
Map analysisStatus = notification.params['analysis'];
expect(analysisStatus['analyzing'], isFalse);

Powered by Google App Engine
This is Rietveld 408576698