Closed Bug 905910 Opened 6 years ago Closed 6 years ago
Enable comm-central tests to run in parallel
Bug 905822 forced all the tests to run in serial to avoid blowing up due to nonparallelizability of current infrastructure. This bug is to track running them in parallel again. The biggest thing we need is to let the fakeserver choose a port to run on. I know that some NNTP tests rely on shutting down and restarting the fakeserver a few times, which means we may need crazier tricks to avoid getting random oranges.
Having had to start poking at serialized mailnews/base or mailnews/db/gloda tests is getting annoying for me when most of my tests are fast, parallelized mailnews/mime. So I've started breaking the necessary sequentialization down in tests. Gloda's tests are parallelized unless they use the IMAP fake server. By contrast, for NNTP, I used the feature of nsIServerSocket that a port of -1 (or 0, but -1 is preferred) lets it choose a random port. This means that I want to kill NNTP_PORT now. It's a pretty simple change for most tests, but I'm less sure that the ones that start and stop the server multiple times could be made to work--there's a dangerous race condition there (I'm looking at you test_bug695309.js). I've tested that the tests pass in parallel mode on my local machine but have made no attempt to verify that this is the case for anything other than Linux x86-64.
Attachment #8402257 - Flags: feedback?(standard8)
Comment on attachment 8402257 [details] [diff] [review] Parallelize news tests Looks reasonable. Works fine on Mac afaict.
Attachment #8402257 - Flags: feedback?(standard8) → feedback+
Apologies for the massive size of the patch, but it proved much harder to break up than I had been expecting...
It's worth noting that every xpcshell test which starts a fakeserver twice is forced to run in serial, even with this patch. I can't guarantee that the same port will be open if run in parallel...
Comment on attachment 8413549 [details] [diff] [review] Parallelize fakeserver-based tests Review of attachment 8413549 [details] [diff] [review]: ----------------------------------------------------------------- I like it, on my machine, cuts down test times from about 5m to 2m 11s. A great advantage. Lets land it before the merge.
Attachment #8413549 - Flags: review?(standard8) → review+
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 31.0
You need to log in before you can comment on or make changes to this bug.