Closed Bug 1200583 Opened 10 years ago Closed 10 years ago

[Messages][Tests] It's difficult to debug when we forget to set the mock data in an integration test

Categories

(Firefox OS Graveyard :: Gaia::SMS, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(b2g-v2.5 fixed)

RESOLVED FIXED
Tracking Status
b2g-v2.5 --- fixed

People

(Reporter: julienw, Assigned: azasypkin)

References

Details

Attachments

(1 file)

Currently, API mocks wait that we set the mock data before returning anything, which is a good thing. As a result when we forget to set the mock data, they never return. It's quite difficult to debug. Maybe a good enough solution is to output a console.log message the first time we call getStorage.
Summary: [Messages] It's difficult to debug when we forget to set the mock data in an integration test → [Messages][Tests] It's difficult to debug when we forget to set the mock data in an integration test
I think, I have one idea that I'd like to try that should make our code working with mocks much easier (from test writer POV).
Flags: needinfo?(azasypkin)
Assignee: nobody → azasypkin
Blocks: 1217859
Status: NEW → ASSIGNED
Flags: needinfo?(azasypkin)
Comment on attachment 8684890 [details] [review] [gaia] azasypkin:bug-1200583-test-storage > mozilla-b2g:master Hey Julien, How does it look? If you're OK with it, I'd say it will be better to uplift this to v2.5 so that test infrastructure is similar to master + without this I can't create test for bug 1217859. Thanks!
Attachment #8684890 - Flags: review?(felash)
Comment on attachment 8684890 [details] [review] [gaia] azasypkin:bug-1200583-test-storage > mozilla-b2g:master r=me but with some food for thoughts on the PR. I'd like that you at least ask yourself about these questions, but maybe we can look at it later.
Attachment #8684890 - Flags: review?(felash) → review+
Thanks for review and questions! I've replied at GitHub and filed a bug 1223350 to investigate some oddness further. Treeherder is green, so landed: https://github.com/mozilla-b2g/gaia/commit/4b7779a91f7bd3c57c7ff1ada1f03a6a8b0bc5ec
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Comment on attachment 8684890 [details] [review] [gaia] azasypkin:bug-1200583-test-storage > mozilla-b2g:master [Approval Request Comment] [Bug caused by] (feature/regressing bug #): n/a [User impact] if declined: no user impact, but it will be quite hard to uplift other fixes with integration tests to v2.5 branch without this patch. [Testing completed]: yes [Risk to taking this patch] (and alternatives if risky): no risk, test-only change. [String changes made]: n/a
Attachment #8684890 - Flags: approval-gaia-v2.5?
Comment on attachment 8684890 [details] [review] [gaia] azasypkin:bug-1200583-test-storage > mozilla-b2g:master Approved for 2.5 uplift. Thanks
Attachment #8684890 - Flags: approval-gaia-v2.5? → approval-gaia-v2.5+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: