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

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

Issue 1396983004: Remove an unused test (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 2 months 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 | « no previous file | pkg/analysis_server/test/integration/test_all.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // BSD-style license that can be found in the LICENSE file.
4
5 library test.integration.analysis.error;
6
7 import 'dart:async';
8
9 import 'package:test_reflective_loader/test_reflective_loader.dart';
10 import 'package:unittest/unittest.dart';
11
12 import '../utils.dart';
13 import 'integration_tests.dart';
14
15 main() {
16 initializeTestEnvironment();
17 // defineReflectiveTests(AsynchronyIntegrationTest);
18 }
19
20 /**
21 * Verify that the server's input and output streams are asynchronous by
22 * attempting to flood its input buffer with commands without listening to
23 * its output buffer for responses. The server should continue to train its
24 * input buffer even though its output buffer is full.
25 *
26 * Once enough commands have been sent, we begin reading from the server's
27 * output buffer, and verify that it responds to the last command.
28 *
29 * NB.
30 *
31 * This test was intentionally disabled, because after r43123 server
32 * writes to stdout synchronously. So, now it is the client's responsibility
33 * to read stdout in a timely manner to avoid blocking the server.
34 */
35 @reflectiveTest
36 class AsynchronyIntegrationTest {
37 /**
38 * Number of messages to queue up before listening for responses.
39 */
40 static const MESSAGE_COUNT = 10000;
41
42 /**
43 * Connection to the analysis server.
44 */
45 final Server server = new Server();
46
47 Future setUp() {
48 return server.start();
49 }
50
51 test_asynchrony() {
52 // Send MESSAGE_COUNT messages to the server without listening for
53 // responses.
54 Future lastMessageResult;
55 for (int i = 0; i < MESSAGE_COUNT; i++) {
56 lastMessageResult = server.send('server.getVersion', null);
57 }
58
59 // Flush the server's standard input stream to verify that it has really
60 // received them all. If the server is blocked waiting for us to read
61 // its responses, the flush will never complete.
62 return server.flushCommands().then((_) {
63 // Begin processing responses from the server.
64 server.listenToOutput((String event, params) {
65 // The only expected notification is server.connected.
66 if (event != 'server.connected') {
67 fail('Unexpected notification: $event');
68 }
69 });
70
71 // Terminate the test when the response to the last message is received.
72 return lastMessageResult.then((_) {
73 server.send("server.shutdown", null).then((_) {
74 return server.exitCode;
75 });
76 });
77 });
78 }
79 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analysis_server/test/integration/test_all.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698