Bug 1390441 - Fix usePingSenderOnShutdown test via reseting TelemetrySend in tests. r=gfritzsche, a=test-only
authorKate Ustiuzhanina <kustiuzhanina@mozilla.com>
Tue, 22 Aug 2017 15:28:18 +0100
changeset 423726 d771f9fdb12ccdad8c40abb517c07c377e9884ac
parent 423725 dc22f52502393f4a216a943d71afc88af5d898c0
child 423727 da38cb67c52b802a0f0a972c68b3a117cee80742
push id1517
push userjlorenzo@mozilla.com
push dateThu, 14 Sep 2017 16:50:54 +0000
treeherdermozilla-release@3b41fd564418 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgfritzsche, test-only
bugs1390441
milestone56.0
Bug 1390441 - Fix usePingSenderOnShutdown test via reseting TelemetrySend in tests. r=gfritzsche, a=test-only
toolkit/components/telemetry/tests/unit/test_TelemetryHealthPing.js
--- a/toolkit/components/telemetry/tests/unit/test_TelemetryHealthPing.js
+++ b/toolkit/components/telemetry/tests/unit/test_TelemetryHealthPing.js
@@ -222,16 +222,17 @@ add_task(async function test_usePingSend
     // We don't support the pingsender on Android, yet, see bug 1335917.
     // We also don't support the pingsender testing on Treeherder for
     // Linux 32 bit (due to missing libraries). So skip it there too.
     // See bug 1310703 comment 78.
     return;
   }
 
   TelemetryHealthPing.testReset();
+  await TelemetrySend.reset();
   PingServer.clearRequests();
 
   // This first failure should immediately trigger a ping.
   // After this, subsequent failures should be throttled.
   await TelemetryHealthPing.recordSendFailure("testFailure");
   await PingServer.promiseNextPing();
 
   TelemetryHealthPing.recordSendFailure("testFailure");