Closed
Bug 481824
Opened 16 years ago
Closed 16 years ago
nsMsgDBView grouping logic is buggy, needs unit tests
Categories
(MailNews Core :: Database, defect)
MailNews Core
Database
Tracking
(Not tracked)
RESOLVED
FIXED
Thunderbird 3.0b3
People
(Reporter: asuth, Assigned: Bienvenu)
References
Details
(Whiteboard: [b3ux])
Attachments
(1 file, 1 obsolete file)
57.77 KB,
patch
|
Bienvenu
:
review+
Bienvenu
:
superreview+
|
Details | Diff | Splinter Review |
I am splitting the nsMsgDBView changes off from bug 474701. Without these fixes, when using a search view, group-by logic is both crashy and incorrect.
The provided patch provides a first-pass at a unit test that wants to at least verify my changes and the use case from bug 474701.
I was originally turfing this to bienvenu because I thought this was crashy, but it turns out that I don't know of any crashers with this patch (The crash I was seeing was because I had not updated the patch properly to account for changes on trunk.) So now I'm turfing it because bienvenu hinted at wanting better searching logic, and because we really really need unit tests for nsMsgDBView and friends and I don't have time to take it further or to clean up the changes I have already made. (nsMsgDBView has crazy many variants and permutations and needs coverage.)
Flags: blocking-thunderbird3?
Reporter | ||
Comment 1•16 years ago
|
||
The very limited set of changes on messageGenerator.js have been mooted by http://hg.mozilla.org/comm-central/rev/99320ed86776. The rejections should be ignored.
Comment 2•16 years ago
|
||
Since this blocks [b3ux] work, it needs to be [b3ux] itself. Getting it on the radar and targetting.
Flags: blocking-thunderbird3? → blocking-thunderbird3+
Whiteboard: [b3ux]
Target Milestone: --- → Thunderbird 3.0b3
Assignee | ||
Comment 3•16 years ago
|
||
I've been running with this a bit - I'll try to figure out why the db isn't valid.
Whiteboard: [b3ux] → [b3ux] [haspatch]
Reporter | ||
Comment 4•16 years ago
|
||
Do you mean why I needed to add m_db guards? If so, it's because gloda is creating a search view which doesn't have an m_db. We just cram stuff in via onSearchHit.
Assignee | ||
Comment 5•16 years ago
|
||
No, I meant why the db you try to get after getting the folder loaded notification after parsing the msg db wasn't valid. aka the GAAAAAAAA comment :-)
Assignee | ||
Comment 6•16 years ago
|
||
updateFolder does not currently return an error when the db is invalid and will be reparsed, but it always sends a folderLoaded notification at the appropriate time (either immediately, or when the folder has been reparsed). I don't know when it stopped returning an error - perhaps jcranmer or rkent or I changed it at some point. But if I remove all the needToWait logic from mailTestUtils.js, then I can get rid of the timeout in mailTestUtils.js, and the one in test_nsMsgDBView.js, and all the tests pass. So I'm probably going to go with that approach.
Assignee | ||
Comment 7•16 years ago
|
||
this cleans up the test code so that we don't need settimeouts - I'm going to have a look through this patch and probably r/sr it if it looks ok, and land it since it's blocking the search bar stuff.
Attachment #365840 -
Attachment is obsolete: true
Assignee | ||
Updated•16 years ago
|
Attachment #367230 -
Flags: superreview+
Attachment #367230 -
Flags: review+
Assignee | ||
Comment 8•16 years ago
|
||
patch checked in, so other search bar stuff can be unblocked.
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Updated•16 years ago
|
Flags: in-testsuite+
Updated•15 years ago
|
Whiteboard: [b3ux] [haspatch] → [b3ux]
You need to log in
before you can comment on or make changes to this bug.
Description
•