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

Unified Diff: tests/standalone/io/dart_std_io_pipe_test.dart

Issue 11343009: Get rid of 'close' on process. It is very easy to use incorrectly and cut off data from your stream… (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comment. Created 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/bin/process_impl.dart ('k') | tests/standalone/io/process_broken_pipe_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/standalone/io/dart_std_io_pipe_test.dart
diff --git a/tests/standalone/io/dart_std_io_pipe_test.dart b/tests/standalone/io/dart_std_io_pipe_test.dart
index 1642fa6b2c08658934b5ae114c99493b50cd51ba..5264a723d84c15e3042d5287600c1bb5071bf5ae 100644
--- a/tests/standalone/io/dart_std_io_pipe_test.dart
+++ b/tests/standalone/io/dart_std_io_pipe_test.dart
@@ -44,7 +44,6 @@ void test(String shellScript, String dartScript, String type) {
future.then((process) {
process.onExit = (exitCode) {
Expect.equals(0, exitCode);
- process.close();
// Check the expected file contents.
if (type == "0") {
@@ -68,6 +67,9 @@ void test(String shellScript, String dartScript, String type) {
// Cleanup test directory.
dir.deleteRecursivelySync();
};
+ // Drain out and err streams so they close.
+ process.stdout.onData = process.stdout.read;
+ process.stderr.onData = process.stderr.read;
});
future.handleException((ProcessException error) {
dir.deleteRecursivelySync();
« no previous file with comments | « runtime/bin/process_impl.dart ('k') | tests/standalone/io/process_broken_pipe_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698