| Index: pkg/analysis_server/test/integration/server_domain_int_test.dart
|
| diff --git a/pkg/analysis_server/test/integration/server_domain_int_test.dart b/pkg/analysis_server/test/integration/server_domain_int_test.dart
|
| deleted file mode 100644
|
| index ff93f01c9fa6d5e9c9c356fa21a72f2730186183..0000000000000000000000000000000000000000
|
| --- a/pkg/analysis_server/test/integration/server_domain_int_test.dart
|
| +++ /dev/null
|
| @@ -1,121 +0,0 @@
|
| -// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
|
| -// for details. All rights reserved. Use of this source code is governed by a
|
| -// BSD-style license that can be found in the LICENSE file.
|
| -
|
| -library test.integration.server.domain;
|
| -
|
| -import 'dart:async';
|
| -
|
| -import 'package:analysis_testing/reflective_tests.dart';
|
| -import 'package:unittest/unittest.dart';
|
| -
|
| -import 'integration_tests.dart';
|
| -
|
| -@ReflectiveTestCase()
|
| -class ServerDomainIntegrationTest extends AbstractAnalysisServerIntegrationTest
|
| - {
|
| - test_getVersion() {
|
| - return sendServerGetVersion();
|
| - }
|
| -
|
| - test_shutdown() {
|
| - return sendServerShutdown().then((_) {
|
| - return new Future.delayed(new Duration(seconds: 1)).then((_) {
|
| - sendServerGetVersion().then((_) {
|
| - fail('Server still alive after server.shutdown');
|
| - });
|
| - // Give the server time to respond before terminating the test.
|
| - return new Future.delayed(new Duration(seconds: 1));
|
| - });
|
| - });
|
| - }
|
| -
|
| - test_setSubscriptions() {
|
| - bool statusReceived = false;
|
| - Completer analysisBegun = new Completer();
|
| - onServerStatus.listen((_) {
|
| - statusReceived = true;
|
| - });
|
| - onAnalysisErrors.listen((_) {
|
| - if (!analysisBegun.isCompleted) {
|
| - analysisBegun.complete();
|
| - }
|
| - });
|
| - return sendServerSetSubscriptions([]).then((_) {
|
| - String pathname = sourcePath('test.dart');
|
| - writeFile(pathname, '''
|
| -main() {
|
| - var x;
|
| -}''');
|
| - standardAnalysisSetup(subscribeStatus: false);
|
| - // Analysis should begin, but no server.status notification should be
|
| - // received.
|
| - return analysisBegun.future.then((_) {
|
| - expect(statusReceived, isFalse);
|
| - return sendServerSetSubscriptions(['STATUS']).then((_) {
|
| - // Tickle test.dart just in case analysis has already completed.
|
| - writeFile(pathname, '''
|
| -main() {
|
| - var y;
|
| -}''');
|
| - // Analysis should eventually complete, and we should be notified
|
| - // about it.
|
| - return analysisFinished;
|
| - });
|
| - });
|
| - });
|
| - }
|
| -
|
| - test_setSubscriptions_invalidService() {
|
| - // TODO(paulberry): verify that if an invalid service is specified, the
|
| - // current subscriptions are unchanged.
|
| - return sendServerSetSubscriptions(['bogus'], checkTypes: false).then((_) {
|
| - fail('setSubscriptions should have produced an error');
|
| - }, onError: (error) {
|
| - // The expected error occurred.
|
| - });
|
| - }
|
| -
|
| - test_connected() {
|
| - expect(serverConnectedParams, isNull);
|
| - }
|
| -
|
| - test_error() {
|
| - // TODO(paulberry): how do we test the 'server.error' notification given
|
| - // that this notification should only occur in the event of a server bug?
|
| - }
|
| -
|
| - test_status() {
|
| - // After we kick off analysis, we should get one server.status message with
|
| - // analyzing=true, and another server.status message after that with
|
| - // analyzing=false.
|
| - Completer analysisBegun = new Completer();
|
| - Completer analysisFinished = new Completer();
|
| - onServerStatus.listen((params) {
|
| - if (params['analysis'] != null) {
|
| - if (params['analysis']['analyzing']) {
|
| - expect(analysisBegun.isCompleted, isFalse);
|
| - analysisBegun.complete();
|
| - } else {
|
| - expect(analysisFinished.isCompleted, isFalse);
|
| - analysisFinished.complete();
|
| - }
|
| - }
|
| - });
|
| - writeFile(sourcePath('test.dart'), '''
|
| -main() {
|
| - var x;
|
| -}''');
|
| - standardAnalysisSetup();
|
| - expect(analysisBegun.isCompleted, isFalse);
|
| - expect(analysisFinished.isCompleted, isFalse);
|
| - return analysisBegun.future.then((_) {
|
| - expect(analysisFinished.isCompleted, isFalse);
|
| - return analysisFinished.future;
|
| - });
|
| - }
|
| -}
|
| -
|
| -main() {
|
| - runReflectiveTests(ServerDomainIntegrationTest);
|
| -}
|
|
|