From dbe17a3c1e953dca0a230abb13bb8fe7c97a077f 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. Ref: https://github.com/nodejs/node/issues/10166 --- 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 {