Closed Bug 583949 Opened 14 years ago Closed 14 years ago

Fix leaks in Firefox Sync unit tests

Categories

(Firefox :: Sync, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: Dolske, Assigned: Dolske)

References

Details

Attachments

(3 files)

Attached patch Patch v.1 (WIP)Splinter Review
Try server runs indicate that that a bunch of the Sync unit tests are causing xpcshell leaks ("Xd" group on TB+PL).

Looks like most are easily fixed by making the tests async, and having httpserver.stop() call do_test_finished as the callback. This is what most tests in the tree already do (because they're inherently asyncish), and Waldo says that the server's .stop() doesn't guarantee a clean synchronous shutdown (so this is the right thing to be doing!).

This fixes most, but not all of the leaks. Checkpointing current work...
Attached file Leaks, post v.1 patch
Log of remaining leaks.

I didn't have luck fixing test_service_cluster, even though it's the same leak signature and problem as all the other tests. Dunno if I just goofed, or if there's more to it. It and test_syncengine_sync.js are the only 2 tests that create multiple http servers, but test_syncengine_sync.js stopped leaking with my fix.

Looking at these leaks next.
Landed dolske's patch http://hg.mozilla.org/services/fx-sync/rev/a018e5a06402

I have another to clean up one more. Then I'm going to disable the remaining tests (filed bug 583985)
Component: General → Sync
Product: Firefox → Weave
QA Contact: general → sync
Target Milestone: Firefox 4.0b3 → ---
Version: Trunk → unspecified
Attached patch Patch v1Splinter Review
Landed as http://hg.mozilla.org/services/fx-sync/rev/b8e8aac682d8

I'm going to close this bug, but we'll want to open a new one for actually fixing the tests that got disabled in bug 583985.
Blocks: 583830
No longer blocks: 583339
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Target Milestone: --- → 1.5
Component: Firefox Sync: Backend → Sync
Product: Cloud Services → Firefox
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: