Bug 717182 - Permanent orange on Windows | TEST-UNEXPECTED-FAIL | test_largeOfflineStore.js (NS_ERROR_FILE_NO_DEVICE_SPACE). r=bienvenu
authorMark Banner <bugzilla@standard8.plus.com>
Fri, 13 Jan 2012 21:49:38 +0000
changeset 9179 a66d30b82ac27c0deb2033c529e601d4d0b5497c
parent 9178 459717882b5b399efa4bbb84f9b9f27377a3c0a0
child 9180 22615ec6dccb16089d8d272f833905cb672ef52f
push id7028
push userbugzilla@standard8.plus.com
push dateSat, 14 Jan 2012 10:34:14 +0000
treeherdercomm-central@22615ec6dccb [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbienvenu
bugs717182
Bug 717182 - Permanent orange on Windows | TEST-UNEXPECTED-FAIL | test_largeOfflineStore.js (NS_ERROR_FILE_NO_DEVICE_SPACE). r=bienvenu
mailnews/imap/test/unit/test_largeOfflineStore.js
mailnews/local/test/unit/test_over2GBMailboxes.js
--- a/mailnews/imap/test/unit/test_largeOfflineStore.js
+++ b/mailnews/imap/test/unit/test_largeOfflineStore.js
@@ -93,17 +93,18 @@ function run_test()
 
   // Get the IMAP inbox...
   let rootFolder = gIMAPIncomingServer.rootFolder;
 
   gIMAPInbox = rootFolder.getFolderWithFlags(Ci.nsMsgFolderFlags.Inbox);
   let outputStream = Cc["@mozilla.org/network/file-output-stream;1"].
                        createInstance(Ci.nsIFileOutputStream)
                                .QueryInterface(Ci.nsISeekableStream);
-  outputStream.init(gIMAPInbox.filePath, -1, -1, 0);
+  // Open in write-only mode, no truncate.
+  outputStream.init(gIMAPInbox.filePath, 0x02, -1, 0);
   // seek to 15 bytes past 4GB.
   outputStream.seek(0, 0x10000000f);
   outputStream.write("from\r\n", 6);
   outputStream.close();
   gOfflineStoreSize = gIMAPInbox.filePath.fileSize;
   // ...and download for offline use.
   gIMAPInbox.downloadAllForOffline(UrlListener, null);
 }
--- a/mailnews/local/test/unit/test_over2GBMailboxes.js
+++ b/mailnews/local/test/unit/test_over2GBMailboxes.js
@@ -30,17 +30,18 @@ function run_test()
   // "Master" do_test_pending(), paired with a do_test_finished() at the end of
   // all the operations.
   do_test_pending();
 
   // extend local folder to over 2GB
   let outputStream = Cc["@mozilla.org/network/file-output-stream;1"].
                        createInstance(Ci.nsIFileOutputStream)
                                .QueryInterface(Ci.nsISeekableStream);
-  outputStream.init(inboxFile, -1, -1, 0);
+  // Open in write-only mode, no truncate.
+  outputStream.init(inboxFile, 0x02, -1, 0);
   // seek past 2GB.
   outputStream.seek(0, 0x80000010);
   outputStream.write(" ", 1);
   outputStream.close();
 
   // add mail data to over 2GB position for over 2G msgkey
   gCopyService.CopyFileMessage(bugmail10, gLocalInboxFolder, null, false, 0,
                                "", copyListener, null);