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

Side by Side Diff: tests/lib/async/slow_consumer2_test.dart

Issue 11778030: Test fixes for dartium (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 11 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « tests/lib/async/merge_stream_test.dart ('k') | tests/lib/async/slow_consumer_test.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 // VMOptions=--old_gen_heap_size=32 5 // VMOptions=--old_gen_heap_size=32
6 6
7 library slow_consumer2_test;
8
7 import 'dart:async'; 9 import 'dart:async';
8 import 'dart:isolate'; 10 import 'dart:isolate';
9 11
10 const int KB = 1024; 12 const int KB = 1024;
11 const int MB = KB * KB; 13 const int MB = KB * KB;
12 const int GB = KB * KB * KB; 14 const int GB = KB * KB * KB;
13 15
14 class SlowConsumer extends StreamConsumer { 16 class SlowConsumer extends StreamConsumer {
15 int receivedCount = 0; 17 int receivedCount = 0;
16 final int bytesPerSecond; 18 final int bytesPerSecond;
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 // file). If the consumer doesn't pause the data-provider it will run out of 93 // file). If the consumer doesn't pause the data-provider it will run out of
92 // heap-space. 94 // heap-space.
93 95
94 new DataProvider(800 * MB, 100 * MB, 1 * MB) 96 new DataProvider(800 * MB, 100 * MB, 1 * MB)
95 .pipe(new SlowConsumer(200 * MB, 5 * MB)) 97 .pipe(new SlowConsumer(200 * MB, 5 * MB))
96 .then((count) { 98 .then((count) {
97 port.close(); 99 port.close();
98 Expect.equals(100 * MB, count); 100 Expect.equals(100 * MB, count);
99 }); 101 });
100 } 102 }
OLDNEW
« no previous file with comments | « tests/lib/async/merge_stream_test.dart ('k') | tests/lib/async/slow_consumer_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698