Skip to content

Commit

Permalink
Bug 1609402 - Improve flakey test that relied on being able to alloca…
Browse files Browse the repository at this point in the history
…te 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
  • Loading branch information
jonco3 committed Jan 22, 2020
1 parent 88755e5 commit 01a0045
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion js/src/jit-test/tests/gc/bug-1505622.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 01a0045

Please sign in to comment.