Skip to content

Commit f827c53

Browse files
aamcommit-bot@chromium.org
authored and
commit-bot@chromium.org
committed
[vm/transferable] Adjust the test so it throws OOM on bionic.
Bug: #46167 Change-Id: I99d4d4584605414ef1438a5b2cd1d9666b654a8e Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201641 Reviewed-by: Ben Konyi <bkonyi@google.com> Reviewed-by: Ryan Macnak <rmacnak@google.com> Commit-Queue: Alexander Aprelev <aam@google.com>
1 parent 6a4bd42 commit f827c53

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

runtime/tests/vm/dart/transferable_throws_oom_test.dart

+3-3
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ main() {
2626
// Attempt to create total 1tb uint8list which should fail on 32 and 64-bit
2727
// platforms.
2828
final bytes100MB = Uint8List(100 * 1024 * 1024);
29-
final total1TB = List<Uint8List>.filled(10000, bytes100MB);
30-
// Try to make a 1 TB transferable.
31-
Expect.throws(() => TransferableTypedData.fromList(total1TB));
29+
final total1PB = List<Uint8List>.filled(10 * 1000 * 1000, bytes100MB);
30+
// Try to make a 1 PB transferable.
31+
Expect.throws(() => TransferableTypedData.fromList(total1PB));
3232
}

runtime/tests/vm/dart_2/transferable_throws_oom_test.dart

+3-3
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ main() {
2626
// Attempt to create total 1tb uint8list which should fail on 32 and 64-bit
2727
// platforms.
2828
final bytes100MB = Uint8List(100 * 1024 * 1024);
29-
final total1TB = List<Uint8List>.filled(10000, bytes100MB);
30-
// Try to make a 1 TB transferable.
31-
Expect.throws(() => TransferableTypedData.fromList(total1TB));
29+
final total1PB = List<Uint8List>.filled(10 * 1000 * 1000, bytes100MB);
30+
// Try to make a 1 PB transferable.
31+
Expect.throws(() => TransferableTypedData.fromList(total1PB));
3232
}

0 commit comments

Comments
 (0)