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

Unified Diff: pkg/analysis_server/test/channel_test.dart

Issue 235953019: Exit stdio-based analysis server when stdin closed. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: pkg/analysis_server/test/channel_test.dart
diff --git a/pkg/analysis_server/test/channel_test.dart b/pkg/analysis_server/test/channel_test.dart
index 2a11638014cb17125fb6e6537d95748bf07c504a..1f23745d5ae86bca23e5923599099acd40f7e28e 100644
--- a/pkg/analysis_server/test/channel_test.dart
+++ b/pkg/analysis_server/test/channel_test.dart
@@ -28,6 +28,7 @@ main() {
});
group('ByteStreamServerChannel', () {
setUp(ByteStreamServerChannelTest.setUp);
+ test('closed', ByteStreamServerChannelTest.closed);
test('listen_wellFormedRequest',
ByteStreamServerChannelTest.listen_wellFormedRequest);
test('listen_invalidRequest',
@@ -226,6 +227,11 @@ class ByteStreamServerChannelTest {
});
}
+ static Future closed() {
+ return inputSink.close().then((_) => channel.closed.timeout(new Duration(
+ seconds: 1)));
+ }
+
static Future listen_wellFormedRequest() {
inputSink.writeln('{"id":"0","method":"server.version"}');
return inputSink.flush().then((_) => requestStream.first.timeout(
« pkg/analysis_server/lib/src/channel.dart ('K') | « pkg/analysis_server/lib/stdio_server.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698