Index: tests/standalone/io/process_working_directory_test.dart |
diff --git a/tests/standalone/io/process_working_directory_test.dart b/tests/standalone/io/process_working_directory_test.dart |
index 3240cb95ec294ff67647cc129fc500c6998a85da..1529a137ae008e4c8e9cef585e5230818b65eadb 100644 |
--- a/tests/standalone/io/process_working_directory_test.dart |
+++ b/tests/standalone/io/process_working_directory_test.dart |
@@ -25,12 +25,12 @@ class ProcessWorkingDirectoryTest { |
var processFuture = |
Process.start(fullTestFilePath, const ["0", "0", "99", "0"], options); |
processFuture.then((process) { |
- process.onExit = (int exitCode) { |
+ process.exitCode.then((int exitCode) { |
Expect.equals(exitCode, 99); |
directory.deleteSync(); |
- }; |
- process.stdout.onData = process.stdout.read; |
- process.stderr.onData = process.stderr.read; |
+ }); |
+ process.stdout.listen((_) {}); |
+ process.stderr.listen((_) {}); |
}).catchError((error) { |
directory.deleteSync(); |
Expect.fail("Couldn't start process"); |