Bug 1147392 - Workaround harness orange, recreate cache entry in test test_cache2-23-read-over-chunk.js every time. r=michal, a=test-only
authorHonza Bambas <honzab.moz@firemni.cz>
Wed, 25 Mar 2015 11:23:00 -0400
changeset 258114 578c3d9bd490d88764c4d4435450c730ca30f5a5
parent 258113 662d10209c462187ac53c0715419e8ca0605bf84
child 258115 03f55ec25d9a3378ea637e14a506a25ba0e4ee25
push id4610
push userjlund@mozilla.com
push dateMon, 30 Mar 2015 18:32:55 +0000
treeherdermozilla-beta@4df54044d9ef [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmichal, test-only
bugs1147392
milestone38.0a2
Bug 1147392 - Workaround harness orange, recreate cache entry in test test_cache2-23-read-over-chunk.js every time. r=michal, a=test-only
netwerk/test/unit/test_cache2-23-read-over-chunk.js
--- a/netwerk/test/unit/test_cache2-23-read-over-chunk.js
+++ b/netwerk/test/unit/test_cache2-23-read-over-chunk.js
@@ -14,17 +14,17 @@ function run_test()
   var payload = "";
   for (var i = 0; i < (kChunkSize + 10); ++i) {
     if (i < (kChunkSize - 5))
       payload += "0";
     else
       payload += String.fromCharCode(i + 65);
   }
 
-  asyncOpenCacheEntry("http://read/", "disk", Ci.nsICacheStorage.OPEN_NORMALLY, LoadContextInfo.default,
+  asyncOpenCacheEntry("http://read/", "disk", Ci.nsICacheStorage.OPEN_TRUNCATE, LoadContextInfo.default,
     new OpenCallback(NEW|WAITFORWRITE, "", payload, function(entry) {
       var is = entry.openInputStream(0);
       pumpReadStream(is, function(read) {
         do_check_eq(read.length, kChunkSize + 10);
         is.close();
         do_check_true(read == payload); // not using do_check_eq since logger will fail for the 1/4MB string
         finish_cache2_test();
       });