Closed
Bug 1379025
Opened 8 years ago
Closed 8 years ago
Sync ping "firm up" follow-up tests
Categories
(Firefox for Android Graveyard :: Metrics, defect)
Firefox for Android Graveyard
Metrics
Tracking
(firefox55 fixed, firefox56 fixed)
RESOLVED
FIXED
Firefox 56
People
(Reporter: Grisha, Assigned: Grisha)
References
Details
Attachments
(1 file)
I somehow entirely missed test changes in Bug 1374758.
Comment hidden (mozreview-request) |
Assignee | ||
Updated•8 years ago
|
Assignee: nobody → gkruglov
Status: NEW → ASSIGNED
Assignee | ||
Comment 2•8 years ago
|
||
Comment 3•8 years ago
|
||
mozreview-review |
Comment on attachment 8884115 [details]
Bug 1379025 - Update sync ping tests for the "firm up" changes
https://reviewboard.mozilla.org/r/155042/#review160310
Works for me!
::: mobile/android/tests/background/junit4/src/org/mozilla/gecko/telemetry/pingbuilders/TelemetrySyncPingBundleBuilderTest.java:143
(Diff revision 1)
> +
> + // Test general shape of payload. Expecting {"syncs":[],"why":"schedule", "version": 1}.
> // NB that even though we set an empty sync event store, it's not in the json string.
> // That's because sync events are not yet instrumented.
> ExtendedJSONObject payload = outgoingPing.getPayload().getObject("payload");
> - assertEquals("{\"syncs\":[],\"why\":\"schedule\"}", payload.toJSONString());
> + assertEquals(3, payload.keySet().size());
Again -- you can `.equals` two EJO's. But I'm fine with this for now.
::: mobile/android/tests/background/junit4/src/org/mozilla/gecko/telemetry/pingbuilders/TelemetrySyncPingBundleBuilderTest.java:194
(Diff revision 1)
>
> - private void assertSync(ExtendedJSONObject sync, String uid, long took, String deviceID, int version, boolean restarted) throws JSONException {
> + private void assertSync(ExtendedJSONObject sync, String uid, long took, String deviceID, boolean restarted) throws JSONException {
> assertEquals(uid, sync.getString("uid"));
> assertEquals(Long.valueOf(took), sync.getLong("took"));
> assertEquals(deviceID, sync.getString("deviceID"));
> - assertEquals(Integer.valueOf(version), sync.getIntegerSafely("version"));
> + assertTrue(sync.getLong("when") != null);
Consider testing that `when` is larger than some fixed timestamp (say from a year ago) and also smaller than the _current_ timestamp.
Attachment #8884115 -
Flags: review?(nalexander) → review+
Comment hidden (mozreview-request) |
Pushed by gkruglov@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/407df61a6300
Update sync ping tests for the "firm up" changes r=nalexander
Comment 6•8 years ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
status-firefox56:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 56
Comment hidden (Intermittent Failures Robot) |
Comment 8•8 years ago
|
||
Can you request uplift here too (from https://bugzilla.mozilla.org/show_bug.cgi?id=1374758#c22) Thanks!
Flags: needinfo?(gkruglov)
Comment 9•8 years ago
|
||
bugherder uplift |
status-firefox55:
--- → fixed
Assignee | ||
Updated•8 years ago
|
Flags: needinfo?(gkruglov)
Updated•4 years ago
|
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•