Bug 1438896 : test for the new probe. , r?chutten draft
authorakriti <akriti.v10@gmail.com>
Fri, 20 Apr 2018 16:43:28 +0530
changeset 785588 1bba2647fb92793b4e70ef8a4e9fdeed731df2f3
parent 782064 ceac91dc08bef5d099c10dda632fc3651b23c897
push id107258
push userbmo:akriti.v10@gmail.com
push dateFri, 20 Apr 2018 11:17:15 +0000
reviewerschutten
bugs1438896
milestone61.0a1
Bug 1438896 : test for the new probe. , r?chutten MozReview-Commit-ID: GEq4MvlIrGX
toolkit/components/telemetry/tests/unit/test_TelemetrySend.js
--- a/toolkit/components/telemetry/tests/unit/test_TelemetrySend.js
+++ b/toolkit/components/telemetry/tests/unit/test_TelemetrySend.js
@@ -453,16 +453,17 @@ add_task(async function test_tooLateToSe
   // Triggering a shutdown should persist the pings
   await TelemetrySend.shutdown();
   const pendingPings = TelemetryStorage.getPendingPingList();
   Assert.equal(pendingPings.length, 1, "Should have a pending ping in storage");
   Assert.equal(pendingPings[0].id, id, "Should have pended our test's ping");
 
   Assert.equal(Telemetry.getHistogramById("TELEMETRY_SEND_FAILURE_TYPE").snapshot().counts[7], 1,
     "Should have registered the failed attempt to send");
+  Assert.equal(histogramValueCount(Telemetry.getKeyedHistogramById("TELEMETRY_SEND_FAILURE_TYPE_PER_PING").snapshot(pendingPings[0].id)), 0);
 
   await TelemetryStorage.reset();
   Assert.equal(TelemetrySend.pendingPingCount, 0, "Should clean up after yourself");
 });
 
 // Test that the current, non-persisted pending pings are properly saved on shutdown.
 add_task(async function test_persistCurrentPingsOnShutdown() {
   const TEST_TYPE = "test-persistCurrentPingsOnShutdown";