Bug 1551841 - increase the test wait time before continuing staging. r=bytesized
authorRobert Strong <robert.bugzilla@gmail.com>
Wed, 15 May 2019 22:22:37 +0000
changeset 535909 506667a67e0495fe6613e7e2404deb06f7bb6d4f
parent 535908 b8de4598780a6e000e3cd3b8fbde5ba3b972c492
child 535910 55a283e793dfd42add9d085f2b32bee82a226946
push id2082
push userffxbld-merge
push dateMon, 01 Jul 2019 08:34:18 +0000
treeherdermozilla-release@2fb19d0466d2 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbytesized
bugs1551841
milestone68.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1551841 - increase the test wait time before continuing staging. r=bytesized Tests intermittently fail on code coverage builds due to the additional time they take to run when compared to other builds Also changes runTelemetryUpdateTest to only use MOZ_TEST_SKIP_UPDATE_STAGE since MOZ_TEST_SLOW_SKIP_UPDATE_STAGE isn't needed for telemetry tests Differential Revision: https://phabricator.services.mozilla.com/D31353
toolkit/mozapps/update/tests/browser/head.js
toolkit/mozapps/update/updater/updater.cpp
--- a/toolkit/mozapps/update/tests/browser/head.js
+++ b/toolkit/mozapps/update/tests/browser/head.js
@@ -974,38 +974,32 @@ function removeUpdateSettingsIni() {
  * @param  stageFailure (optional)
  *         Whether to force a staging failure by removing the modified
  *         update-settings.ini file.
  * @return A promise which will resolve after the .
  */
 function runTelemetryUpdateTest(updateParams, event, stageFailure = false) {
   return (async function() {
     Services.telemetry.clearScalars();
-    gEnv.set("MOZ_TEST_SLOW_SKIP_UPDATE_STAGE", "1");
+    gEnv.set("MOZ_TEST_SKIP_UPDATE_STAGE", "1");
     await SpecialPowers.pushPrefEnv({
       set: [
         [PREF_APP_UPDATE_DISABLEDFORTESTING, false],
       ],
     });
 
     await setupTestUpdater();
 
     if (stageFailure) {
       removeUpdateSettingsIni();
     }
 
     let updateURL = URL_HTTP_UPDATE_SJS + "?detailsURL=" + gDetailsURL +
                     updateParams + getVersionParams();
     setUpdateURL(updateURL);
-    if (Services.prefs.getBoolPref(PREF_APP_UPDATE_STAGING_ENABLED)) {
-      // Since MOZ_TEST_SKIP_UPDATE_STAGE is checked before
-      // MOZ_TEST_SLOW_SKIP_UPDATE_STAGE in updater.cpp this removes the need
-      // for the continue file to continue staging the update.
-      gEnv.set("MOZ_TEST_SKIP_UPDATE_STAGE", "1");
-    }
     gAUS.checkForBackgroundUpdates();
     await waitForEvent(event);
   })();
 }
 
 /**
  * Gets an object with the expected update phase values that can be passed to
  * checkTelemetryUpdatePhases for update phase telemetry tests.
--- a/toolkit/mozapps/update/updater/updater.cpp
+++ b/toolkit/mozapps/update/updater/updater.cpp
@@ -2481,22 +2481,22 @@ static void UpdateThreadFunc(void* param
         rv = OK;
       } else if (EnvHasValue("MOZ_TEST_SLOW_SKIP_UPDATE_STAGE")) {
         // The following is to simulate staging so the UI tests have time to
         // show that the update is being staged.
         NS_tchar continueFilePath[MAXPATHLEN] = {NS_T('\0')};
         NS_tsnprintf(continueFilePath,
                      sizeof(continueFilePath) / sizeof(continueFilePath[0]),
                      NS_T("%s/continueStaging"), gInstallDirPath);
-        // Use 50 retries for staging requests to lessen the likelihood of tests
-        // intermittently failing on verify tasks due to launching the updater.
-        // The total time to wait with the default interval of 100 ms is
-        // approximately 5 seconds. The total time for tests is longer to
+        // Use 300 retries for staging requests to lessen the likelihood of
+        // tests intermittently failing on verify tasks due to launching the
+        // updater. The total time to wait with the default interval of 100 ms
+        // is approximately 30 seconds. The total time for tests is longer to
         // account for the extra time it takes for the updater to launch.
-        const int max_retries = 50;
+        const int max_retries = 300;
         int retries = 0;
         while (retries++ < max_retries) {
 #  ifdef XP_WIN
           Sleep(100);
 #  else
           usleep(100000);
 #  endif
           // Continue after the continue file exists and is removed.