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

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

Issue 11818027: Change limits on slow-consumer test. (Closed) Base URL: http://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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/lib/async/slow_consumer3_test.dart
diff --git a/tests/lib/async/slow_consumer3_test.dart b/tests/lib/async/slow_consumer3_test.dart
index 09e9a0320f7a4b54807e408a34716c3851e6aa80..0f8084b57ee5dcf7f46a792c3d366e8726ea318f 100644
--- a/tests/lib/async/slow_consumer3_test.dart
+++ b/tests/lib/async/slow_consumer3_test.dart
@@ -59,15 +59,20 @@ Stream<List> dataGenerator(int bytesTotal, int chunkSize) {
main() {
var port = new ReceivePort();
// The data provider can deliver 800MBs of data as fast as it is
- // requested. The data is sent in 1MB chunks. The consumer has a buffer of
- // 5MB. That is, it can accept a few packages without pausing its input.
+ // requested. The data is sent in 0.5MB chunks. The consumer has a buffer of
+ // 3MB. That is, it can accept a few packages without pausing its input.
+ //
+ // Notice that we aren't really counting bytes, but words, since we use normal
+ // lists where each entry takes up a full word. In 64-bit VMs this will be
+ // 8 bytes per entry, so the 3*MB buffer is picked to stay below 32 actual
+ // MiB.
//
// This test is limited to 32MB of heap-space (see VMOptions on top of the
// file). If the consumer doesn't pause the data-provider it will run out of
// heap-space.
- dataGenerator(100 * MB, 1 * MB)
- .pipe(new SlowConsumer(200 * MB, 5 * MB))
+ dataGenerator(100 * MB, 512 * KB)
+ .pipe(new SlowConsumer(200 * MB, 3 * MB))
.then((count) {
port.close();
Expect.equals(100 * MB, count);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698