Bug 1318696 - Increase timeout in browser_thumbnails_bg_destroy_browser.js; r=adw
authorGeoff Brown <gbrown@mozilla.com>
Wed, 01 Mar 2017 12:11:47 -0700
changeset 345355 a10bbbacbbdf
parent 345354 9e8add7d25dd
child 345356 665c50232125
push id31436
push userkwierso@gmail.com
push dateThu, 02 Mar 2017 01:18:52 +0000
treeherdermozilla-central@e91de6fb2b3d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersadw
bugs1318696
milestone54.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 1318696 - Increase timeout in browser_thumbnails_bg_destroy_browser.js; r=adw
toolkit/components/thumbnails/test/browser_thumbnails_bg_destroy_browser.js
--- a/toolkit/components/thumbnails/test/browser_thumbnails_bg_destroy_browser.js
+++ b/toolkit/components/thumbnails/test/browser_thumbnails_bg_destroy_browser.js
@@ -14,17 +14,23 @@ function* runTests() {
 
   let defaultTimeout = BackgroundPageThumbs._destroyBrowserTimeout;
   BackgroundPageThumbs._destroyBrowserTimeout = 1000;
 
   yield bgCapture(url1);
   ok(thumbnailExists(url1), "First file should exist after capture.");
   removeThumbnail(url1);
 
-  yield wait(2000);
+  // arbitrary wait - intermittent failures noted after 2 seconds
+  for (let i = 0; i < 5; i++) {
+    yield wait(1000);
+    if (BackgroundPageThumbs._thumbBrowser === undefined) {
+      break;
+    }
+  }
   is(BackgroundPageThumbs._thumbBrowser, undefined,
      "Thumb browser should be destroyed after timeout.");
   BackgroundPageThumbs._destroyBrowserTimeout = defaultTimeout;
 
   yield bgCapture(url2);
   ok(thumbnailExists(url2), "Second file should exist after capture.");
   removeThumbnail(url2);