Closed
Bug 1275423
Opened 8 years ago
Closed 7 years ago
Unit test TestJSONWebTokenUtils > testDSAGeneration fails locally
Categories
(Firefox for Android Graveyard :: Testing, defect)
Tracking
(firefox56 fixed, firefox57 fixed)
RESOLVED
FIXED
Firefox 57
People
(Reporter: mcomella, Assigned: Grisha)
References
Details
Attachments
(1 file)
with:
org.mozilla.gecko.browserid.test.TestJSONWebTokenUtils > testDSAGeneration FAILED
org.junit.ComparisonFailure at TestJSONWebTokenUtils.java:125
Reporter | ||
Comment 1•8 years ago
|
||
It looks like we're trying to compare two strings of JSON with assertEquals [1] but the parameters in the string are swapped. Oops!
https://dxr.mozilla.org/mozilla-central/source/mobile/android/tests/background/junit4/src/org/mozilla/gecko/browserid/test/TestJSONWebTokenUtils.java#125
Assignee: nobody → michael.l.comella
Reporter | ||
Comment 2•8 years ago
|
||
I forced that assertion to pass locally & the assertions after following. Notably, they're commented with [1]:
// Really(!) brittle tests below. The DSA signature algorithm is not deterministic, so we can't test the actual signature.
I'm not entirely certain what's going on here or why it's passing in automation but I don't think it's important enough to put more time into at the moment.
[1]: https://dxr.mozilla.org/mozilla-central/source/mobile/android/tests/background/junit4/src/org/mozilla/gecko/browserid/test/TestJSONWebTokenUtils.java#
Assignee: michael.l.comella → nobody
Comment 3•7 years ago
|
||
This is now happening after Bug 1376306. All that needs to happen is the components in the JSON object need to be compared, not the strings.
grisha, could you follow-up with the trivial fix? I don't want Bug 1376306 to get backed out!
Flags: needinfo?(gkruglov)
Comment 4•7 years ago
|
||
Comment hidden (mozreview-request) |
Assignee | ||
Updated•7 years ago
|
Assignee: nobody → gkruglov
Status: NEW → ASSIGNED
Flags: needinfo?(gkruglov)
Assignee | ||
Comment 7•7 years ago
|
||
Pushed patch makes tests happy locally. Let's see how it does on try. https://treeherder.mozilla.org/#/jobs?repo=try&revision=3932195739f3
Comment 8•7 years ago
|
||
mozreview-review |
Comment on attachment 8892709 [details]
Bug 1275423 - Update failing DSA signature tests
https://reviewboard.mozilla.org/r/163696/#review169100
The generated DSA string bakes in the JSON of the key, so if the JSON changes, that will change too.
This is safe because we now _require_ Java >1.8, which seems to be consistent with how the JSON displays. That could change across OS's, Java versions, etc, but let's just fix automation for now.
Thanks for taking this for me, Grisha!
Attachment #8892709 -
Flags: review?(nalexander) → review+
Assignee | ||
Comment 9•7 years ago
|
||
Unit tests pass in automation. Landing!
Assignee | ||
Comment 10•7 years ago
|
||
Also, thanks for clarifying, Nick! I was sure to leave the "this is brittle" comment intact :)
Comment 11•7 years ago
|
||
Pushed by gkruglov@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/a0899eec8a93
Update failing DSA signature tests r=nalexander
Comment 12•7 years ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
status-firefox57:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 57
Comment 13•7 years ago
|
||
uplift |
status-firefox56:
--- → fixed
Comment hidden (Intermittent Failures Robot) |
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
•