Closed
Bug 991490
Opened 10 years ago
Closed 10 years ago
[email/backend] persistent test failure in test_compose_blobs.js due to undefined/null inconsistency in smtp/account.js
Categories
(Firefox OS Graveyard :: Gaia::E-Mail, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
1.4 S5 (11apr)
People
(Reporter: asuth, Assigned: asuth)
Details
(Whiteboard: [c= p=0])
Attachments
(1 file)
To paraphrase The Smiths, there is an error that never goes out in test_compose_blobs.js' "large attachments" case. The root problem is that SmtpAccount's sendMessage callback does callback(null) instead of callback(undefined). The logging UI says the wacky/confusing thing that: namedValue! (name: sent result, value: null) expected but got namedValue! (name: sent result, value: null) This nonsense is because: JSON.stringify([undefined]) === '[null]' (But our actual test logic in log.js is doing "null === undefined" which correctly evaluates to false.)
Assignee | ||
Comment 1•10 years ago
|
||
Note that there's a vice-versa in comment 0. The right thing is to explicitly return a null error code when there is no error, not to rely on unspecified arguments to evaluate to undefined. This makes the tests green on travis again.
Attachment #8401107 -
Flags: review?(m)
Comment 2•10 years ago
|
||
Comment on attachment 8401107 [details] [review] do callback(null) instead of callback() beautiful
Attachment #8401107 -
Flags: review?(m) → review+
Assignee | ||
Comment 3•10 years ago
|
||
landed: https://github.com/mozilla-b2g/gaia-email-libs-and-more/pull/298 https://github.com/mozilla-b2g/gaia-email-libs-and-more/commit/b7c9030a7318ce260fb78aaf2d8223336e808ce5 https://github.com/mozilla-b2g/gaia/pull/18017 https://github.com/mozilla-b2g/gaia/commit/adfb9362cab9a733b30538b16ecadb9260a6ba20
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Whiteboard: [c= p=0]
Target Milestone: --- → 1.4 S5 (11apr)
You need to log in
before you can comment on or make changes to this bug.
Description
•