Combine gc() calls in test-weak-set.js to reduce intermittent fails

RESOLVED FIXED

Status

defect
P1
normal
RESOLVED FIXED
4 years ago
4 years ago

People

(Reporter: evold, Assigned: evold)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

There are a number of intermittent failures in test-weak-set.js due to the gc() call taking too long, so I think that we should do at least three things here:

1) remove the unnecessary test loaders in this file, to reduce overall memory usage before calling gc() (and to make the tests easier to read)
2) combine all of the tests, so that only one gc() call is made.
3) make an assertion call every 30secs until the gc() call has completed.
Assignee: nobody → evold
Priority: -- → P1
Comment on attachment 8604332 [details] [review]
Link to Github pull-request: https://github.com/mozilla/addon-sdk/pull/1969

Looks good, but we should probably just use native weak set for this module

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakSet
Attachment #8604332 - Flags: review?(jsantell) → review+

Comment 3

4 years ago
Commits pushed to master at https://github.com/mozilla/addon-sdk

https://github.com/mozilla/addon-sdk/commit/7398249ebccd546e730cc9c6e4837d490d7077e6
Bug 1163796 test-weak-set.js improvements

* combine gc() calls 4 -> 1
* remove unnecessary test loader usage
* assert every 0.25 secs while waiting for gc() to avoid intermittent timeouts

https://github.com/mozilla/addon-sdk/commit/f27acad1b88aa45d4edd33680fc7075db71eaeef
Merge pull request #1969 from erikvold/1161052

Bug 1163796 - Combine gc() calls in test-weak-set.js to reduce intermittent fails r=jsantell
(In reply to Jordan Santell [:jsantell] [@jsantell] from comment #2)
> Comment on attachment 8604332 [details] [review]
> Link to Github pull-request: https://github.com/mozilla/addon-sdk/pull/1969
> 
> Looks good, but we should probably just use native weak set for this module
> 
> https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/
> Global_Objects/WeakSet

WeakSet is not iterable.
Status: NEW → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.