Closed Bug 1125108 Opened 10 years ago Closed 10 years ago

Disable blanket by default in watcher

Categories

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

x86_64
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: julienw, Assigned: rickychien)

References

Details

Attachments

(3 files)

STR: 1. have the test-agent browser + server running in background 2. save a syntax error in a file that's monitored by the test-agent Expected: * an error shows up in the console * when I save the file removing the syntax error, it's now run again Actual: * an error shows up in the console * when I save the file removing the syntax error, nothing runs. And actually the same happens for all files. I need to reload the test-agent window to make it work again. The blanket error is: JavaScript error: app://sms.gaiamobile.org/common/vendor/blanket/blanket.js?time=1422018172628, line 41: Error: Line 41: Unexpected token : I think we need to catch those errors so that the test-agent can run subsequent tests.
Hey Ricky, do you have an idea for this?
Flags: needinfo?(ricky060709)
Werid :( My test-agent can automatically re-trigger when I save the file with removing a syntax error. In order to catch those errors, I think we can add Error.prototype.stack [1] to do so. However, I hope that patch will not change anything in blanket.js. [1] https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/Stack
Flags: needinfo?(ricky060709)
Humm if it works for you maybe I'm doing something wrong. I'll look further.
Assignee: nobody → ricky060709
Status: NEW → ASSIGNED
Attached file Js-test-agent PR
Hi Julien, so far unit testing is hard to debug for a while since enabling blanket by default output so many dara-uri instead of proper error messages. I'd like to disable it for reducing such trouble. Please review it kindly thanks! =)
Attachment #8565399 - Flags: review?(felash)
Comment on attachment 8565399 [details] [review] Js-test-agent PR This fixes the issue for me but because it doesn't fix the root issue we might want to land this in a separate bug? r=me for this patch
Attachment #8565399 - Flags: review?(felash) → review+
I'd like to address the root issue in another bug because it seems not so easy to fix if it turns out that we have to patch blanket.js.
(In reply to Ricky Chien [:rickychien] from comment #7) > I'd like to address the root issue in another bug because it seems not so > easy to fix if it turns out that we have to patch blanket.js. 2 thoughts: * IMO it would have been easier to just file a separate bug to disable blanket and have your patch there... Now I need to clone this bug... * I think we just need to try/catch somewhere in our code when we instrument using blanket before launching the tests.
Blocks: 1136037
Renaming the bug based on comment and the commit messages.
Summary: When a test file has a syntax error, blanket fails and then the test-agent can't run anything → Disable blanket by default in watcher
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: