Closed Bug 1288918 Opened 3 years ago Closed 3 years ago

create tests for 4GB local folders

Categories

(MailNews Core :: Backend, defect)

defect
Not set

Tracking

(Not tracked)

RESOLVED FIXED
Thunderbird 51.0

People

(Reporter: aceman, Assigned: aceman)

References

Details

Attachments

(2 files)

Create some tests to check a TB folder can operate when it is larger than 4GB.
Attached patch patchSplinter Review
This checks if we can download and copy msgs into a folder when it is above 4GB. Compaction above 4GB was already there.

To be applied on top of the patch in 789679 (the one adding the pref).
Attachment #8775933 - Flags: review?(rkent)
Comment on attachment 8775933 [details] [diff] [review]
patch

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

This test failed for me under Windows. The solution though is easy: each time there is a check of fileSize from an nsIFile, you need to clone it. This is a well-known issue under Windows.

I'll attach my modified version that succeeds. If this is acceptable to you, you can land that and consider it r+=me.

Also, I changed one do_print to a dump() since I was not seeing that result under xpcshell-test --verbose.  Maybe I ma doing something wrong? That is an optional change.
Attachment #8775933 - Flags: review?(rkent) → review-
Why wasn't the cloning needed until now?
I'm not sure of the exact rules for when it is required. But you can see other examples of when this di done, for example https://dxr.mozilla.org/comm-central/source/mailnews/base/src/nsMsgFolderCompactor.cpp#503
Comment on attachment 8776661 [details] [diff] [review]
My modified version using clone()

Yes, I'm fine with the .clone()s.
Attachment #8776661 - Flags: review+
https://hg.mozilla.org/comm-central/rev/264ccac9eb403db7b4aeb55d92aa3929c7c51f47
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 51.0
You need to log in before you can comment on or make changes to this bug.