Bug 1254726 - fix intermittent test_action-clear-snapshots_06 (osx10.6);r=fitzgen draft
authorJulian Descottes <jdescottes@mozilla.com>
Fri, 11 Mar 2016 03:04:07 +0100
changeset 339462 f1bc35ec1ca2e8c9b6346a61e3c43e55bb788ef7
parent 339119 0d38e391b3a15ff78e4922071a067640990a44fc
child 515996 1a6b11e87f2b18d55a8681e266bf450eb0bbef13
push id12737
push userjdescottes@mozilla.com
push dateFri, 11 Mar 2016 09:57:03 +0000
reviewersfitzgen
bugs1254726
milestone48.0a1
Bug 1254726 - fix intermittent test_action-clear-snapshots_06 (osx10.6);r=fitzgen After enabling diff view and selecting two snapshots, wait for TAKE_CENSUS_DIFF_END action in the test before deleting all snapshots. Otherwise, TAKE_CENSUS_DIFF_END might be dispatched after clearSnapshots toggled diff mode off. MozReview-Commit-ID: HNmIVn1SC8c
devtools/client/memory/test/unit/test_action-clear-snapshots_06.js
--- a/devtools/client/memory/test/unit/test_action-clear-snapshots_06.js
+++ b/devtools/client/memory/test/unit/test_action-clear-snapshots_06.js
@@ -34,18 +34,22 @@ add_task(function* () {
   yield waitUntilSnapshotState(store,
     [states.SAVED_CENSUS, states.SAVED_CENSUS]);
 
   dispatch(toggleDiffing());
   dispatch(selectSnapshotForDiffingAndRefresh(heapWorker,
                                               getState().snapshots[0]));
   dispatch(selectSnapshotForDiffingAndRefresh(heapWorker,
                                               getState().snapshots[1]));
+
   ok(getState().diffing, "We should be in diffing view");
 
+  yield waitUntilAction(store, actions.TAKE_CENSUS_DIFF_END);
+  ok(true, "Received TAKE_CENSUS_DIFF_END action");
+
   ok(true, "Dispatch clearSnapshots action");
   let deleteEvents = Promise.all([
     waitUntilAction(store, actions.DELETE_SNAPSHOTS_START),
     waitUntilAction(store, actions.DELETE_SNAPSHOTS_END)
   ]);
   dispatch(clearSnapshots(heapWorker));
   yield deleteEvents;
   ok(true, "received delete snapshots events");