Bug 1292197, Bug 1289087, Bug 1283703, Bug 1283702, Bug 1283701, Bug 1283700, Bug 1283699 - Add requestLongerTimeout for slow memory tests; r=jimb
authorNick Fitzgerald <fitzgen@gmail.com>
Wed, 10 Aug 2016 17:05:41 -0700
changeset 399634 5d16dca06481c0d2303bfcf8c7d13f9d27b865a8
parent 399633 6275988f9d94c9694d9a28f505ab92289110f1d5
child 399635 100cd15ce84dadb833f27ab7409efbdb16cefc71
push id25905
push userdtownsend@mozilla.com
push dateThu, 11 Aug 2016 17:57:58 +0000
reviewersjimb
bugs1292197, 1289087, 1283703, 1283702, 1283701, 1283700, 1283699
milestone51.0a1
Bug 1292197, Bug 1289087, Bug 1283703, Bug 1283702, Bug 1283701, Bug 1283700, Bug 1283699 - Add requestLongerTimeout for slow memory tests; r=jimb Pretty much all of the browser mochitests for the memory panel have very infrequent (about once a month) timeouts. In every case, the test has not hung and just sat there, but is still actively doing work and just loses the race against the timeout timer by fractions of a second. Ideally, we would speed up the tests, but given that we already use small (in terms of heap size) test cases and do as many analyses as we can in parallel, I think the best we can do is increase the timeout threshold for these problematic tests.
devtools/client/memory/test/browser/head.js
--- a/devtools/client/memory/test/browser/head.js
+++ b/devtools/client/memory/test/browser/head.js
@@ -51,16 +51,20 @@ this.closeMemoryPanel = Task.async(funct
  *     this.test = makeMemoryTest(TEST_URL, function* ({ tab, panel }) {
  *         // Your tests go here...
  *     });
  */
 function makeMemoryTest(url, generator) {
   return Task.async(function* () {
     waitForExplicitFinish();
 
+    // It can take a long time to save a snapshot to disk, read the snapshots
+    // back from disk, and finally perform analyses on them.
+    requestLongerTimeout(2);
+
     const tab = yield addTab(url);
     const results = yield openMemoryPanel(tab);
 
     try {
       yield* generator(results);
     } catch (err) {
       ok(false, "Got an error: " + DevToolsUtils.safeErrorString(err));
     }