Bug 1410145 - Fix wrong version field in android sync ping. r=Grisha

MozReview-Commit-ID: 1Q4Dz7g5QPA

--HG--
extra : rebase_source : 98ea2d40ad582dd84687d42cef4fb0eff4e808df
This commit is contained in:
Thom Chiovoloni 2017-10-19 12:56:56 -04:00
Родитель 0d4a611a04
Коммит 3f1b2cd57a
2 изменённых файлов: 5 добавлений и 2 удалений

Просмотреть файл

@ -28,6 +28,9 @@ import java.util.TimeZone;
* Responsible for building a Sync Ping, based on the telemetry docs:
* https://firefox-source-docs.mozilla.org/toolkit/components/telemetry/telemetry/data/sync-ping.html
*
* Fields common to all pings are documented here:
* https://firefox-source-docs.mozilla.org/toolkit/components/telemetry/telemetry/data/common-ping.html
*
* This builder takes two stores ('sync' and 'event') and produces a single "sync ping".
*
* Note that until Bug 1363924, event telemetry will be ignored.
@ -40,7 +43,7 @@ import java.util.TimeZone;
*/
public class TelemetrySyncPingBundleBuilder extends TelemetryPingBuilder {
private static final String PING_TYPE = "sync";
private static final int PING_BUNDLE_VERSION = 5; // Bug 1374758
private static final int PING_BUNDLE_VERSION = 4; // Bug 1410145
private static final int PING_SYNC_DATA_FORMAT_VERSION = 1; // Bug 1374758
public static final String UPLOAD_REASON_FIRST = "first";

Просмотреть файл

@ -112,7 +112,7 @@ public class TelemetrySyncPingBundleBuilderTest {
assertTrue(outgoingPing.getPayload().containsKey("payload"));
assertTrue(outgoingPing.getPayload().containsKey("id"));
assertEquals("sync", outgoingPing.getPayload().getString("type"));
assertEquals(Integer.valueOf(5), outgoingPing.getPayload().getIntegerSafely("version"));
assertEquals(Integer.valueOf(4), outgoingPing.getPayload().getIntegerSafely("version"));
// Test application key.
ExtendedJSONObject application = outgoingPing.getPayload().getObject("application");