| 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 de0af377fad10b105dd3c25c43727f8139ba8990..2b28fd38baf82e7c1d6a6c62f024e13fe4124417 100644
|
| --- a/pkg/analysis_server/test/integration/integration_tests.dart
|
| +++ b/pkg/analysis_server/test/integration/integration_tests.dart
|
| @@ -146,11 +146,12 @@ abstract class AbstractAnalysisServerIntegrationTest {
|
| // Matchers common to all domains
|
| // ------------------------------
|
|
|
| -const Matcher isResultResponse = const MatchesJsonObject('result response',
|
| +const Matcher isResponse = const MatchesJsonObject('response',
|
| const {
|
| 'id': isString
|
| }, optionalFields: const {
|
| - 'result': anything
|
| + 'result': anything,
|
| + 'error': isError
|
| });
|
|
|
| const Matcher isError = const MatchesJsonObject('Error', const {
|
| @@ -166,12 +167,6 @@ const Matcher isError = const MatchesJsonObject('Error', const {
|
| 'data': anything
|
| });
|
|
|
| -const Matcher isErrorResponse = const MatchesJsonObject('error response', const
|
| - {
|
| - 'id': isString,
|
| - 'error': isError
|
| -});
|
| -
|
| const Matcher isNotification = const MatchesJsonObject('notification', const {
|
| 'event': isString
|
| }, optionalFields: const {
|
| @@ -529,17 +524,13 @@ class Server {
|
| // TODO(paulberry): propagate the error info to the completer.
|
| completer.completeError(new UnimplementedError(
|
| 'Server responded with an error'));
|
| - // Check that the message is well-formed. We do this after calling
|
| - // completer.completeError() so that we don't stall the test in the
|
| - // event of an error.
|
| - expect(message, isErrorResponse);
|
| } else {
|
| completer.complete(messageAsMap['result']);
|
| - // Check that the message is well-formed. We do this after calling
|
| - // completer.complete() so that we don't stall the test in the
|
| - // event of an error.
|
| - expect(message, isResultResponse);
|
| }
|
| + // Check that the message is well-formed. We do this after calling
|
| + // completer.complete() or completer.completeError() so that we don't
|
| + // stall the test in the event of an error.
|
| + expect(message, isResponse);
|
| } else {
|
| // Message is a notification. It should have an event and possibly
|
| // params.
|
|
|