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

Side by Side Diff: pkg/analysis_server/test/integration/server/status_test.dart

Issue 2564863003: Get all integration tests running with the new driver (Closed)
Patch Set: Created 4 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 | « pkg/analysis_server/test/integration/server/shutdown_test.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.server.status;
6
7 import 'dart:async'; 5 import 'dart:async';
8 6
9 import 'package:analysis_server/plugin/protocol/protocol.dart'; 7 import 'package:analysis_server/plugin/protocol/protocol.dart';
10 import 'package:test/test.dart'; 8 import 'package:test/test.dart';
11 import 'package:test_reflective_loader/test_reflective_loader.dart'; 9 import 'package:test_reflective_loader/test_reflective_loader.dart';
12 10
13 import '../integration_tests.dart'; 11 import '../integration_tests.dart';
14 12
15 main() { 13 main() {
16 defineReflectiveSuite(() { 14 defineReflectiveSuite(() {
17 defineReflectiveTests(Test); 15 defineReflectiveTests(StatusTest);
16 defineReflectiveTests(StatusTest_Driver);
18 }); 17 });
19 } 18 }
20 19
21 @reflectiveTest 20 class AbstractStatusTest extends AbstractAnalysisServerIntegrationTest {
22 class Test extends AbstractAnalysisServerIntegrationTest {
23 test_status() { 21 test_status() {
24 // After we kick off analysis, we should get one server.status message with 22 // After we kick off analysis, we should get one server.status message with
25 // analyzing=true, and another server.status message after that with 23 // analyzing=true, and another server.status message after that with
26 // analyzing=false. 24 // analyzing=false.
27 Completer analysisBegun = new Completer(); 25 Completer analysisBegun = new Completer();
28 Completer analysisFinished = new Completer(); 26 Completer analysisFinished = new Completer();
29 onServerStatus.listen((ServerStatusParams params) { 27 onServerStatus.listen((ServerStatusParams params) {
30 if (params.analysis != null) { 28 if (params.analysis != null) {
31 if (params.analysis.isAnalyzing) { 29 if (params.analysis.isAnalyzing) {
32 expect(analysisBegun.isCompleted, isFalse); 30 expect(analysisBegun.isCompleted, isFalse);
(...skipping 12 matching lines...) Expand all
45 }'''); 43 }''');
46 standardAnalysisSetup(); 44 standardAnalysisSetup();
47 expect(analysisBegun.isCompleted, isFalse); 45 expect(analysisBegun.isCompleted, isFalse);
48 expect(analysisFinished.isCompleted, isFalse); 46 expect(analysisFinished.isCompleted, isFalse);
49 return analysisBegun.future.then((_) { 47 return analysisBegun.future.then((_) {
50 expect(analysisFinished.isCompleted, isFalse); 48 expect(analysisFinished.isCompleted, isFalse);
51 return analysisFinished.future; 49 return analysisFinished.future;
52 }); 50 });
53 } 51 }
54 } 52 }
53
54 @reflectiveTest
55 class StatusTest extends AbstractStatusTest {}
56
57 @reflectiveTest
58 class StatusTest_Driver extends AbstractStatusTest {
59 @override
60 bool get enableNewAnalysisDriver => true;
61 }
OLDNEW
« no previous file with comments | « pkg/analysis_server/test/integration/server/shutdown_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698