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

Unified Diff: tests/lib/async/slow_consumer2_test.dart

Issue 23522012: Replace ReceivePorts with asyncStart|End in some tests. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Remove bad comment. Created 7 years, 4 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/lib/async/run_zoned8_test.dart ('k') | tests/lib/async/slow_consumer3_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/lib/async/slow_consumer2_test.dart
diff --git a/tests/lib/async/slow_consumer2_test.dart b/tests/lib/async/slow_consumer2_test.dart
index 0c56f4a2e7651a0942f4749eab64e1fb86ceb22c..f631a77a441862bc45973ea239be97b4c727e5af 100644
--- a/tests/lib/async/slow_consumer2_test.dart
+++ b/tests/lib/async/slow_consumer2_test.dart
@@ -6,9 +6,9 @@
library slow_consumer2_test;
+import 'package:async_helper/async_helper.dart';
import "package:expect/expect.dart";
import 'dart:async';
-import 'dart:isolate';
const int KB = 1024;
const int MB = KB * KB;
@@ -105,7 +105,7 @@ class DataProvider {
}
main() {
- var port = new ReceivePort();
+ asyncStart();
// The data provider can deliver 800MB/s of data. It sends 100MB of data to
// the slower consumer who can only read 200MB/s. The data is sent in 1MB
// chunks. The consumer has a buffer of 5MB. That is, it can accept a few
@@ -118,7 +118,7 @@ main() {
new DataProvider(800 * MB, 100 * MB, 1 * MB).stream
.pipe(new SlowConsumer(200 * MB, 5 * MB))
.then((count) {
- port.close();
Expect.equals(100 * MB, count);
+ asyncEnd();
});
}
« no previous file with comments | « tests/lib/async/run_zoned8_test.dart ('k') | tests/lib/async/slow_consumer3_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698