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

Side by Side Diff: pkg/analysis_server/test/integration/asynchrony_test.dart

Issue 683573003: Fix analysis server asynchrony test. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | 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.analysis.error; 5 library test.integration.analysis.error;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 8
9 import 'package:unittest/unittest.dart'; 9 import 'package:unittest/unittest.dart';
10 10
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 lastMessageResult = server.send('server.getVersion', null); 44 lastMessageResult = server.send('server.getVersion', null);
45 } 45 }
46 46
47 // Flush the server's standard input stream to verify that it has really 47 // Flush the server's standard input stream to verify that it has really
48 // received them all. If the server is blocked waiting for us to read 48 // received them all. If the server is blocked waiting for us to read
49 // its responses, the flush will never complete. 49 // its responses, the flush will never complete.
50 return server.flushCommands().then((_) { 50 return server.flushCommands().then((_) {
51 51
52 // Begin processing responses from the server. 52 // Begin processing responses from the server.
53 server.listenToOutput((String event, params) { 53 server.listenToOutput((String event, params) {
54 // No notifications are expected. 54 // The only expected notification is server.connected.
55 fail('Unexpected notification: $event'); 55 if (event != 'server.connected') {
56 fail('Unexpected notification: $event');
57 }
56 }); 58 });
57 59
58 // Terminate the test when the response to the last message is received. 60 // Terminate the test when the response to the last message is received.
59 lastMessageResult.then((_) { 61 return lastMessageResult.then((_) {
60 server.send("server.shutdown", null).then((_) { 62 server.send("server.shutdown", null).then((_) {
61 return server.exitCode; 63 return server.exitCode;
62 }); 64 });
63 }); 65 });
64 }); 66 });
65 } 67 }
66 } 68 }
67 69
68 main() { 70 main() {
69 runReflectiveTests(AsynchronyIntegrationTest); 71 runReflectiveTests(AsynchronyIntegrationTest);
70 } 72 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698