Bug 1114788 - Disable failing test on workers. r=mrbkap, a=test-only
authorBen Turner <bent.mozilla@gmail.com>
Tue, 14 Apr 2015 16:40:51 -0700
changeset 258482 c82fcbeb7194
parent 258481 7496d2eea111
child 258483 ea342656f3cb
push id4678
push userryanvm@gmail.com
push date2015-04-15 13:36 +0000
treeherdermozilla-beta@e487ace8d7f9 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmrbkap, test-only
bugs1114788
milestone38.0
Bug 1114788 - Disable failing test on workers. r=mrbkap, a=test-only
dom/indexedDB/test/unit/test_transaction_lifetimes.js
--- a/dom/indexedDB/test/unit/test_transaction_lifetimes.js
+++ b/dom/indexedDB/test/unit/test_transaction_lifetimes.js
@@ -1,13 +1,21 @@
 /**
  * Any copyright is dedicated to the Public Domain.
  * http://creativecommons.org/publicdomain/zero/1.0/
  */
 
+var disableWorkerTest =
+  "This test requires a precise 'executeSoon()' to complete reliably. On a " +
+  "worker 'executeSoon()' currently uses 'setTimeout()', and that switches " +
+  "to the timer thread and back before completing. That gives the IndexedDB " +
+  "transaction thread time to fully complete transactions and to place " +
+  "'complete' events in the worker thread's queue before the timer event, " +
+  "causing ordering problems in the spot marked 'Worker Fails Here' below.";
+
 var testGenerator = testSteps();
 
 function testSteps()
 {
   let request = indexedDB.open(this.window ? window.location.pathname : "Splendid Test", 1);
   request.onerror = errorHandler;
   request.onupgradeneeded = grabEventAndContinueHandler;
   request.onsuccess = unexpectedSuccessHandler;
@@ -36,16 +44,18 @@ function testSteps()
   os = transaction.objectStore("foo");
   // Place a request to keep the transaction alive long enough for our
   // executeSoon.
   let requestComplete = false;
 
   let wasAbleToGrabObjectStoreOutsideOfCallback = false;
   let wasAbleToGrabIndexOutsideOfCallback = false;
   executeSoon(function() {
+    // Worker Fails Here! Due to the thread switching of 'executeSoon()' the
+    // transaction can commit and fire a 'complete' event before we continue.
     ok(!requestComplete, "Ordering is correct.");
     wasAbleToGrabObjectStoreOutsideOfCallback = !!transaction.objectStore("foo");
     wasAbleToGrabIndexOutsideOfCallback =
       !!transaction.objectStore("foo").index("bar");
   });
 
   request = os.add({});
   request.onerror = errorHandler;