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

Unified Diff: pkg/analyzer_cli/test/build_mode_test.dart

Issue 1892483003: close the input stream in build_mode tests so they dont hang (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 4 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer_cli/test/build_mode_test.dart
diff --git a/pkg/analyzer_cli/test/build_mode_test.dart b/pkg/analyzer_cli/test/build_mode_test.dart
index f69a9f8e5dcabbc2c109906241ec440b0c91aab7..9c88a0f4e63d0513a51215b64ebde2effd8a1571 100644
--- a/pkg/analyzer_cli/test/build_mode_test.dart
+++ b/pkg/analyzer_cli/test/build_mode_test.dart
@@ -49,6 +49,7 @@ class WorkerLoopTest {
'package:foo/bar.dart|/inputs/foo/lib/bar.dart',
]);
stdinStream.addInputBytes(_serializeProto(request));
+ stdinStream.close();
new TestAnalyzerWorkerLoop(connection, (CommandLineOptions options) {
expect(options.buildSummaryInputs,
@@ -82,6 +83,7 @@ class WorkerLoopTest {
var request = new WorkRequest();
request.arguments.addAll(['--unknown-option', '/foo.dart', '/bar.dart']);
stdinStream.addInputBytes(_serializeProto(request));
+ stdinStream.close();
new TestAnalyzerWorkerLoop(connection).run();
expect(connection.responses, hasLength(1));
@@ -92,6 +94,7 @@ class WorkerLoopTest {
test_run_invalidRequest_noArgumentsInputs() {
stdinStream.addInputBytes(_serializeProto(new WorkRequest()));
+ stdinStream.close();
new TestAnalyzerWorkerLoop(connection).run();
expect(connection.responses, hasLength(1));
@@ -103,6 +106,7 @@ class WorkerLoopTest {
test_run_invalidRequest_randomBytes() {
stdinStream.addInputBytes([1, 2, 3]);
+ stdinStream.close();
new TestAnalyzerWorkerLoop(connection).run();
expect(connection.responses, hasLength(1));
@@ -112,7 +116,7 @@ class WorkerLoopTest {
}
test_run_stopAtEOF() {
- stdinStream.addInputBytes([-1]);
+ stdinStream.close();
new TestAnalyzerWorkerLoop(connection).run();
}
}
« 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