Closed Bug 836620 Opened 11 years ago Closed 11 years ago

Cleanup app binary copies used by app update xpcshell tests

Categories

(Toolkit :: Application Update, defect)

x86_64
Windows 7
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla21
Tracking Status
firefox18 --- wontfix
firefox19 --- fixed
firefox20 --- fixed
firefox21 --- fixed
firefox-esr17 --- fixed

People

(Reporter: robert.strong.bugs, Assigned: robert.strong.bugs)

Details

(Whiteboard: [qa-])

Attachments

(1 file, 1 obsolete file)

A bunch are left behind and they should be cleaned up.
Attached patch patch rev1 (obsolete) — Splinter Review
Also includes some additional logging and cleanup. Sent to try though I didn't have any problems running these locally and I don't expect any problems with these changes though there might be timeouts if the app doesn't exit. If that does happen I'll add additional logging so it is apparent that the application isn't exiting as expected.
https://tbpl.mozilla.org/?tree=Try&rev=69b0e86c5c09
Assignee: nobody → robert.bugzilla
Status: NEW → ASSIGNED
Attachment #708439 - Flags: review?(netzen)
Comment on attachment 708439 [details] [diff] [review]
patch rev1

Review of attachment 708439 [details] [diff] [review]:
-----------------------------------------------------------------

I was wondering if it would be better to put the removeCallbackCopy inside a callback for do_register_cleanup.  I'm fine with this though as per your Comment 1.

::: toolkit/mozapps/update/test/unit/head_update.js.in
@@ +1411,5 @@
>                "and the expected command line arguments passed to it");
>    do_check_eq(logContents, expectedLogContents);
>  
>    // Use a timeout to give any files that were in use additional time to close.
> +  do_timeout(TEST_HELPER_TIMEOUT, removeCallbackCopy);

nit: I think you can just call this directly since it loops recursively inside that function already with a timeout.
Attachment #708439 - Flags: review?(netzen) → review+
(In reply to Brian R. Bondy [:bbondy] from comment #2)
> Comment on attachment 708439 [details] [diff] [review]
> patch rev1
> 
> Review of attachment 708439 [details] [diff] [review]:
> -----------------------------------------------------------------
> 
> I was wondering if it would be better to put the removeCallbackCopy inside a
> callback for do_register_cleanup.  I'm fine with this though as per your
> Comment 1.
I considered that but I wanted this to happen during the testing portion since it has to use a timeout to call the function again in case the binary is in use.
> ::: toolkit/mozapps/update/test/unit/head_update.js.in
> @@ +1411,5 @@
> >                "and the expected command line arguments passed to it");
> >    do_check_eq(logContents, expectedLogContents);
> >  
> >    // Use a timeout to give any files that were in use additional time to close.
> > +  do_timeout(TEST_HELPER_TIMEOUT, removeCallbackCopy);
> 
> nit: I think you can just call this directly since it loops recursively
> inside that function already with a timeout.
good catch and thanks
Attached patch patch rev2Splinter Review
Also made a couple of changes to the dump statements to make it clear in the logs where it failed. I'll wait on the try builds before landing.

Carrying forward r+
Attachment #708439 - Attachment is obsolete: true
Attachment #708453 - Flags: review+
https://hg.mozilla.org/mozilla-central/rev/c0dc5d403329
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla21
Whiteboard: [qa-]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: