Closed Bug 498535 Opened 13 years ago Closed 13 years ago

Make mozmill test timeouts more realistic,


(Thunderbird :: General, defect)

Not set


(Not tracked)



(Reporter: asuth, Assigned: asuth)



(1 file)

Mozmill tests were failing on my Mac Mini due to insufficient timeout durations.  This resolves that issue for me.

I believe there may be another issue related to re-definition of Cc/Ci/Cu that davida is pursuing.

This patch does include one other minor change, which is that it removes some ill-advised exception-catching detritus in  The exception handler was originally used to compel us to dump our results even when an exception happens.  (On linux, mozmill frequently tries to kill an already-dead process, which results in an exception.)  This need was later obviated by using the atexit module instead.

The motivating exception for the change is an ECONNREFUSED exception that is sometimes observed.  I think I actually know what is happening, but it would be good to know for sure/be able to diagnose future exceptions without having to make this change then (and have people curse my name for having that useless catch there):

1) Thunderbird starts up, jsbridge accepts connections.
2) jsbridge's wait_and_create_network method successfully connects to that Thunderbird instance.  (It has an initial loop that expects socket failures up until the time when it connects successfully.)
3) Thunderbird restart logic shuts down thunderbird and the jsbridge listener.
4) The jsbridge logic tries to connect (thinking Thunderbird is now up for good), but since Thunderbird and jsbridge are dead, it gets ECONNREFUSED and dies.
5) Thunderbird comes back, but it doesn't matter because is dead.

Ideally, we could avoid running Thunderbird in a situation where it needs to restart, so the situation is avoided entirely.  Unfortunately, I'm pretty sure things don't work at all if we preclude reloads.  We should probably be able to get away with forcing an explicit earlier step that causes the required XPCOM registrations to happen, although I vaguely recall trying that and having difficulties.

The jsbridge problem should likely be a different bug... feel free to copy-and-paste my analysis or clone the bug or whatever.
Attachment #383388 - Flags: review?(bugzilla)
Comment on attachment 383388 [details] [diff] [review]
v1 make timeouts for mozmill window helper support code more reasonable

>diff --git a/mail/test/mozmill/ b/mail/test/mozmill/
>--- a/mail/test/mozmill/
>+++ b/mail/test/mozmill/
>@@ -269,12 +269,9 @@ def prettyPrintResults():
>         for failure in result['fails']:
>             if 'exception' in failure:
>                 prettyPrintException(failure['exception'])
> import atexit
> atexit.register(prettyPrintResults)
> if __name__ == '__main__':
>-    try:
>-        ThunderTestCLI().run()
>-    except Exception, e:
>-        print 'There was an exception', e
>+    ThunderTestCLI().run()

This part is already in
and ignore comment 1 :-(
Attachment #383388 - Flags: review?(bugzilla) → review+
Comment on attachment 383388 [details] [diff] [review]
v1 make timeouts for mozmill window helper support code more reasonable

r=Standard8 on the basis I get the same results before and after with this patch.
Closed: 13 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.