From 01a0045b12bcd255534b682b109da44370056b61 Mon Sep 17 00:00:00 2001 From: Jon Coppeard Date: Wed, 22 Jan 2020 18:09:56 +0000 Subject: [PATCH] Bug 1609402 - Improve flakey test that relied on being able to allocate 1MB of GC things in under 5 seconds r=sfink Tests that involve timing are often problematic. Here we're checking that hitting the heap limit inside the five second time limit we set for skipping last ditch GCs doesn't trigger a GC, but allocating enough to hit this limit can take longer than five seconds on a busy system. The patch makes the max heap size much smaller and so reduces the possibility that that this can happen. Differential Revision: https://phabricator.services.mozilla.com/D60655 --HG-- extra : moz-landing-system : lando --- js/src/jit-test/tests/gc/bug-1505622.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/js/src/jit-test/tests/gc/bug-1505622.js b/js/src/jit-test/tests/gc/bug-1505622.js index c6eb07a59a193..bd1815f822e1a 100644 --- a/js/src/jit-test/tests/gc/bug-1505622.js +++ b/js/src/jit-test/tests/gc/bug-1505622.js @@ -22,7 +22,9 @@ function allocUntilFail() { gczeal(0); // Set a small heap limit. -gcparam("maxBytes", 1024 * 1024); +gc(); +let currentSize = gcparam("gcBytes"); +gcparam("maxBytes", currentSize + 16 * 1024); // Set the time limit for skipping last ditch GCs to 5 seconds. gcparam("minLastDitchGCPeriod", 5);