From 4caae6924f23b290c17e8430ba689e4ca4667321 Mon Sep 17 00:00:00 2001 From: "Sakthipriyan Vairamani (thefourtheye)" Date: Sun, 5 Feb 2017 20:15:37 +0530 Subject: [PATCH] test: reduce buffer size in buffer-creation test This test is allocating much more memory than necessary to actually reproduce the original problem. Lowering the amount of memory allocated increases performance at least in some cases and makes this test less likely to time out on SmartOS. PR-URL: https://github.com/nodejs/node/pull/11177 Ref: https://github.com/nodejs/node/issues/10166 Reviewed-By: James M Snell Reviewed-By: Julien Gilli Reviewed-By: Colin Ihrig --- test/sequential/test-buffer-creation-regression.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/sequential/test-buffer-creation-regression.js b/test/sequential/test-buffer-creation-regression.js index b5c8450e036cc8..8137e4830a9cb0 100644 --- a/test/sequential/test-buffer-creation-regression.js +++ b/test/sequential/test-buffer-creation-regression.js @@ -20,9 +20,9 @@ const acceptableOOMErrors = [ 'Invalid array buffer length' ]; -const size = 8589934592; /* 1 << 33 */ -const offset = 4294967296; /* 1 << 32 */ const length = 1000; +const offset = 4294967296; /* 1 << 32 */ +const size = offset + length; let arrayBuffer; try {