Chromium Code Reviews| 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 98e560166c174ea0418d7c72abad68d683ab33a3..9ed551cc47447a8a61ff887f975352dddd05ae4a 100644 |
| --- a/pkg/analysis_server/test/analysis_server_test.dart |
| +++ b/pkg/analysis_server/test/analysis_server_test.dart |
| @@ -4,8 +4,6 @@ |
| library test.analysis_server; |
| -import 'dart:async'; |
| - |
| import 'package:analyzer/src/generated/engine.dart'; |
| import 'package:analyzer/src/generated/error.dart'; |
| import 'package:analyzer/src/generated/source.dart'; |
| @@ -34,16 +32,6 @@ class AnalysisServerTestHelper { |
| main() { |
| group('AnalysisServer', () { |
| - test('addContextToWorkQueue_whenNotRunning', () { |
| - AnalysisServerTestHelper helper = new AnalysisServerTestHelper(); |
| - helper.server.running = false; |
| - MockAnalysisContext context = new MockAnalysisContext(); |
| - helper.server.addContextToWorkQueue(context); |
| - // Pump the event queue to make sure the server doesn't try to do any |
| - // analysis. |
| - return pumpEventQueue(); |
| - }); |
| - |
| test('server.status notifications', () { |
| AnalysisServerTestHelper helper = new AnalysisServerTestHelper(); |
| MockAnalysisContext context = new MockAnalysisContext(); |
| @@ -57,12 +45,12 @@ main() { |
| context.when(callsTo("performAnalysisTask")) |
| ..thenReturn(firstResult, 3) |
| ..thenReturn(lastResult); |
| - helper.server.addContextToWorkQueue(context); |
| + helper.server.schedulePerformAnalysisOperation(context); |
| // Pump the event queue to make sure the server has finished any |
| // analysis. |
| return pumpEventQueue().then((_) { |
| List<Notification> notifications = helper.channel.notificationsReceived; |
| - expect(notifications.length, equals(9)); |
| + expect(notifications.length, equals(5)); |
|
Brian Wilkerson
2014/06/02 18:21:03
Given that the length will change every time we ad
scheglov
2014/06/02 18:32:26
Done.
|
| Notification notification = notifications[notifications.length - 1]; |
| Map analysisStatus = notification.params['analysis']; |
| expect(analysisStatus['analyzing'], isFalse); |
| @@ -123,19 +111,6 @@ main() { |
| expect(json['correction'], equals(errorCode.correction)); |
| }); |
| - test('performTask_whenNotRunning', () { |
| - AnalysisServerTestHelper helper = new AnalysisServerTestHelper(); |
| - // If the server is shut down while there is analysis still pending, |
| - // performTask() should notice that the server is no longer running and |
| - // do no analysis. |
| - MockAnalysisContext context = new MockAnalysisContext(); |
| - helper.server.addContextToWorkQueue(context); |
| - helper.server.running = false; |
| - // Pump the event queue to make sure the server doesn't try to do any |
| - // analysis. |
| - return pumpEventQueue(); |
| - }); |
| - |
| test('shutdown', () { |
| AnalysisServerTestHelper helper = new AnalysisServerTestHelper(); |
| helper.server.handlers = [new ServerDomainHandler(helper.server)]; |