| Index: pkg/analysis_server/test/integration/integration_tests.dart
|
| diff --git a/pkg/analysis_server/test/integration/integration_tests.dart b/pkg/analysis_server/test/integration/integration_tests.dart
|
| index a0128b692a239de0a8b54bfd8908e95fbd72b1dd..5004f869658be8512d2d1961f650546ce7dc728b 100644
|
| --- a/pkg/analysis_server/test/integration/integration_tests.dart
|
| +++ b/pkg/analysis_server/test/integration/integration_tests.dart
|
| @@ -9,14 +9,14 @@ import 'dart:collection';
|
| import 'dart:convert';
|
| import 'dart:io';
|
|
|
| +import 'package:analysis_server/plugin/protocol/protocol.dart';
|
| import 'package:analysis_server/src/constants.dart';
|
| -import 'package:analysis_server/src/protocol.dart';
|
| +import 'package:analysis_server/src/server/driver.dart' as analysisServer;
|
| import 'package:path/path.dart';
|
| import 'package:unittest/unittest.dart';
|
|
|
| import 'integration_test_methods.dart';
|
| import 'protocol_matchers.dart';
|
| -import 'package:analysis_server/src/server/driver.dart' as analysisServer;
|
|
|
| const Matcher isBool = const isInstanceOf<bool>('bool');
|
|
|
| @@ -28,11 +28,11 @@ const Matcher isNotification = const MatchesJsonObject(
|
|
|
| const Matcher isObject = isMap;
|
|
|
| +const Matcher isString = const isInstanceOf<String>('String');
|
| +
|
| final Matcher isResponse = new MatchesJsonObject('response', {'id': isString},
|
| optionalFields: {'result': anything, 'error': isRequestError});
|
|
|
| -const Matcher isString = const isInstanceOf<String>('String');
|
| -
|
| Matcher isListOf(Matcher elementMatcher) => new _ListOf(elementMatcher);
|
|
|
| Matcher isMapOf(Matcher keyMatcher, Matcher valueMatcher) =>
|
| @@ -165,6 +165,21 @@ abstract class AbstractAnalysisServerIntegrationTest
|
| }
|
|
|
| /**
|
| + * If [skipShutdown] is not set, shut down the server.
|
| + */
|
| + Future shutdownIfNeeded() {
|
| + if (skipShutdown) {
|
| + return new Future.value();
|
| + }
|
| + // Give the server a short time to comply with the shutdown request; if it
|
| + // doesn't exit, then forcibly terminate it.
|
| + sendServerShutdown();
|
| + return server.exitCode.timeout(SHUTDOWN_TIMEOUT, onTimeout: () {
|
| + return server.kill();
|
| + });
|
| + }
|
| +
|
| + /**
|
| * Convert the given [relativePath] to an absolute path, by interpreting it
|
| * relative to [sourceDirectory]. On Windows any forward slashes in
|
| * [relativePath] are converted to backslashes.
|
| @@ -218,21 +233,6 @@ abstract class AbstractAnalysisServerIntegrationTest
|
| file.writeAsStringSync(contents);
|
| return file.resolveSymbolicLinksSync();
|
| }
|
| -
|
| - /**
|
| - * If [skipShutdown] is not set, shut down the server.
|
| - */
|
| - Future shutdownIfNeeded() {
|
| - if (skipShutdown) {
|
| - return new Future.value();
|
| - }
|
| - // Give the server a short time to comply with the shutdown request; if it
|
| - // doesn't exit, then forcibly terminate it.
|
| - sendServerShutdown();
|
| - return server.exitCode.timeout(SHUTDOWN_TIMEOUT, onTimeout: () {
|
| - return server.kill();
|
| - });
|
| - }
|
| }
|
|
|
| /**
|
|
|