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

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

Issue 2687963003: [dart:io] flush() stdin before close()ing (Closed)
Patch Set: Created 3 years, 10 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 | « tests/standalone/io/named_pipe_script_test.dart ('k') | tests/standalone/io/process_stderr_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/standalone/io/process_detached_test.dart
diff --git a/tests/standalone/io/process_detached_test.dart b/tests/standalone/io/process_detached_test.dart
index b72f26af6328524e9bf99b9261603a162c599841..b4122526f4c5edc439f936fc382ded33aaddd73b 100644
--- a/tests/standalone/io/process_detached_test.dart
+++ b/tests/standalone/io/process_detached_test.dart
@@ -47,7 +47,7 @@ void testWithStdio() {
Expect.isNull(process.exitCode);
var message = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9];
process.stdin.add(message);
- process.stdin.close();
+ process.stdin.flush().then((_) => process.stdin.close());
var f1 = process.stdout.fold([], (p, e) => p..addAll(e));
var f2 = process.stderr.fold([], (p, e) => p..addAll(e));
Future.wait([f1, f2])
« no previous file with comments | « tests/standalone/io/named_pipe_script_test.dart ('k') | tests/standalone/io/process_stderr_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698