Closed Bug 1571656 Opened 1 year ago Closed 3 months ago

Use Assert.jsm numeric comparison functions in tests

Categories

(Firefox :: General, task, P5)

task

Tracking

()

RESOLVED FIXED
Firefox 72
Tracking Status
firefox72 --- fixed

People

(Reporter: mbirghan, Assigned: mbirghan)

Details

Attachments

(1 file)

Bug 1147751 added support for numeric comparison functions to Assert.jsm, so we should replace:

Assert.ok(foo < bar, "foo should be less than bar");
Assert.ok(foo > bar, "foo should be more than bar");

with:

Assert.less(foo, bar, "foo should be less than bar");
Assert.greater(foo, bar, "foo should be more than bar");
Type: defect → task
Priority: -- → P5
Keywords: checkin-needed

Pushed by rmaries@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/81156ff3f4fa
Use Assert.jsm numeric comparison functions in tests r=mixedpuppy,MattN

Keywords: checkin-needed

Backed out changeset 81156ff3f4fa (bug 1571656) for causing browser_PageActions.js and test_insertTree_fixupOrSkipInvalidEntries.js to perma fail

push that caused the backout: https://treeherder.mozilla.org/#/jobs?repo=autoland&group_state=expanded&selectedJob=262222981&resultStatus=testfailed%2Cbusted%2Cexception%2Cretry%2Cusercancel%2Crunning%2Cpending%2Crunnable&revision=81156ff3f4fab856dec063a81358dd517c8a8f2e

failures:
https://treeherder.mozilla.org/#/jobs?repo=autoland&group_state=expanded&resultStatus=testfailed%2Cbusted%2Cexception&classifiedState=unclassified&fromchange=38459b4f9d63f583a89a618cf73a62cc7e777d31&selectedJob=262222254&searchStr=windows%2C10%2Cx64%2Casan%2Cmochitests%2Ctest-windows10-64-asan%2Fopt-mochitest-browser-chrome-e10s-3%2Cm%28bc3%29

https://treeherder.mozilla.org/#/jobs?repo=autoland&group_state=expanded&resultStatus=testfailed%2Cbusted%2Cexception&classifiedState=unclassified&fromchange=38459b4f9d63f583a89a618cf73a62cc7e777d31&selectedJob=262219504&searchStr=os%2Cx%2C10.14%2Cdebug%2Cxpcshell%2Ctests%2Ctest-macosx1014-64%2Fdebug-xpcshell-e10s-2%2Cx%28x2%29

backout: https://hg.mozilla.org/integration/autoland/rev/481b18961f7e4fc35e0452fae14355e0a573881b

also: https://treeherder.mozilla.org/#/jobs?repo=autoland&group_state=expanded&resultStatus=testfailed%2Cbusted%2Cexception&classifiedState=unclassified&fromchange=38459b4f9d63f583a89a618cf73a62cc7e777d31&selectedJob=262220172&searchStr=linux%2Cx64%2Cdebug%2Cxpcshell%2Ctests%2Ctest-linux64%2Fdebug-xpcshell-e10s-6%2Cx%28x6%29

Flags: needinfo?(mbirghan)

mbirghan, is this still wanted or can we close it?

Yes. I did some other things and forgot this was still open. I will try to finish it until the end of the week.

Flags: needinfo?(mbirghan)

We're sorry, Autoland could not rebase your commits for you automatically. Please manually rebase your commits and try again. applying /tmp/tmpv4_iom toolkit/components/places/tests/head_common.js Hunk #1 FAILED at 906. 1 out of 1 hunk FAILED -- saving rejects to file toolkit/components/places/tests/head_common.js.rej toolkit/components/crashes/tests/xpcshell/test_crash_service.js Hunk #1 FAILED at 114. 1 out of 1 hunk FAILED -- saving rejects to file toolkit/components/crashes/tests/xpcshell/test_crash_service.js.rej browser/extensions/pdfjs/test/browser_pdfjs_main.js Hunk #1 FAILED at 62. 1 out of 1 hunk FAILED -- saving rejects to file browser/extensions/pdfjs/test/browser_pdfjs_main.js.rej browser/components/sessionstore/test/browser_background_tab_crash.js Hunk #1 FAILED at 80. 1 out of 1 hunk FAILED -- saving rejects to file browser/components/sessionstore/test/browser_background_tab_crash.js.rej browser/components/migration/tests/unit/test_IE_history.js Hunk #1 FAILED at 45. 1 out of 1 hunk FAILED -- saving rejects to file browser/components/migration/tests/unit/test_IE_history.js.rej abort: patch command failed: exited with status 256

Flags: needinfo?(mbirghan)
Flags: needinfo?(mbirghan)
Pushed by dluca@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/96048cce4b80
Use Assert.jsm numeric comparison functions in tests r=mixedpuppy,MattN
Pushed by cbrindusan@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/edb4de0b8fdc
Use Assert.jsm numeric comparison functions in tests r=mixedpuppy,MattN
Status: NEW → RESOLVED
Closed: 3 months ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 72
Flags: needinfo?(mbirghan)
You need to log in before you can comment on or make changes to this bug.