| OLD | NEW |
| 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 |
| 11 import '../reflective_tests.dart'; | 11 import '../reflective_tests.dart'; |
| 12 import 'integration_tests.dart'; | 12 import 'integration_tests.dart'; |
| 13 | 13 |
| 14 main() { | 14 main() { |
| 15 runReflectiveTests(AsynchronyIntegrationTest); | 15 // runReflectiveTests(AsynchronyIntegrationTest); |
| 16 } | 16 } |
| 17 | 17 |
| 18 /** | 18 /** |
| 19 * Verify that the server's input and output streams are asynchronous by | 19 * Verify that the server's input and output streams are asynchronous by |
| 20 * attempting to flood its input buffer with commands without listening to | 20 * attempting to flood its input buffer with commands without listening to |
| 21 * its output buffer for responses. The server should continue to train its | 21 * its output buffer for responses. The server should continue to train its |
| 22 * input buffer even though its output buffer is full. | 22 * input buffer even though its output buffer is full. |
| 23 * | 23 * |
| 24 * Once enough commands have been sent, we begin reading from the server's | 24 * Once enough commands have been sent, we begin reading from the server's |
| 25 * output buffer, and verify that it responds to the last command. | 25 * output buffer, and verify that it responds to the last command. |
| 26 * |
| 27 * NB. |
| 28 * |
| 29 * This test was intentionally disabled, because after r43123 server |
| 30 * writes to stdout synchronously. So, now it is the client's responsibility |
| 31 * to read stdout in a timely manner to avoid blocking the server. |
| 26 */ | 32 */ |
| 27 @reflectiveTest | 33 @reflectiveTest |
| 28 class AsynchronyIntegrationTest { | 34 class AsynchronyIntegrationTest { |
| 29 /** | 35 /** |
| 30 * Number of messages to queue up before listening for responses. | 36 * Number of messages to queue up before listening for responses. |
| 31 */ | 37 */ |
| 32 static const MESSAGE_COUNT = 10000; | 38 static const MESSAGE_COUNT = 10000; |
| 33 | 39 |
| 34 /** | 40 /** |
| 35 * Connection to the analysis server. | 41 * Connection to the analysis server. |
| (...skipping 27 matching lines...) Expand all Loading... |
| 63 | 69 |
| 64 // Terminate the test when the response to the last message is received. | 70 // Terminate the test when the response to the last message is received. |
| 65 return lastMessageResult.then((_) { | 71 return lastMessageResult.then((_) { |
| 66 server.send("server.shutdown", null).then((_) { | 72 server.send("server.shutdown", null).then((_) { |
| 67 return server.exitCode; | 73 return server.exitCode; |
| 68 }); | 74 }); |
| 69 }); | 75 }); |
| 70 }); | 76 }); |
| 71 } | 77 } |
| 72 } | 78 } |
| OLD | NEW |