Closed
Bug 936369
Opened 11 years ago
Closed 11 years ago
[system] Intermittent Travis Unit Test Failure: KeyboardManager Transitions Call showKeyboard against visible keyboard: Error: timeout of 2000ms exceeded
Categories
(Firefox OS Graveyard :: Gaia::System, defect)
Tracking
(b2g-v1.3 fixed)
RESOLVED
FIXED
Tracking | Status | |
---|---|---|
b2g-v1.3 | --- | fixed |
People
(Reporter: julienw, Assigned: julienw)
References
Details
Attachments
(1 file, 1 obsolete file)
See also bug 935904 and bug 936011.
[system] KeyboardManager Transitions Call showKeyboard against visible keyboard:
Error: timeout of 2000ms exceeded
at (anonymous) (http://test-agent.gaiamobile.org:8080/common/vendor/mocha/mocha.js:3680)
Comment 1•11 years ago
|
||
ping Jan and Gary.
Could one of you help look into this?
Thanks.
Flags: needinfo?(janjongboom)
Flags: needinfo?(gchen)
Updated•11 years ago
|
Assignee: nobody → gchen
Flags: needinfo?(gchen)
Comment 2•11 years ago
|
||
Attachment #8343515 -
Flags: review?(rlu)
Comment 3•11 years ago
|
||
Comment on attachment 8343515 [details] [review]
pull request: https://github.com/mozilla-b2g/gaia/pull/14436
got wrong way to resolve this issue, remove review flasg first.
Attachment #8343515 -
Flags: review?(rlu)
Updated•11 years ago
|
Flags: needinfo?(janjongboom)
Assignee | ||
Comment 4•11 years ago
|
||
I've seen this intermittent again today and I really want to get rid of it.
There are lots of tests where we wait for a specific transition or things like this. I really think this is useless:
* the transition CSS is injected in the test, therefore, in the test, you're really testing your test data instead of real code
* this makes the test extremely fragile
No, what you need to test is what your JS code is doing: that it correctly changes a class, things like that.
As a rule, you should avoid as much as possible to rely on asynchronous things to happen, as this will break from time to time on Travis and TBPL.
Gary, I can try to patch the unit tests if you're ok with these rules?
Flags: needinfo?(gchen)
Comment 7•11 years ago
|
||
Well, in this case it tests the underlying showing/hiding logic, by piggy-backing on the fact that a transition is made if the keyboard gets shown. Which is important because the underlying code also relies on the animation finishing succesfully to trigger future events.
Assignee | ||
Comment 8•11 years ago
|
||
If you want to test whether the underlying code works, you can send a "transitionend" in the test. There is no need to use a real transition.
Again, waiting for a transition event from a CSS you inject is just testing nothing at all.
Assignee | ||
Comment 9•11 years ago
|
||
I'm doing it right now, you'll take it or not ;)
Assignee: gchen → felash
Assignee | ||
Comment 11•11 years ago
|
||
Rewritten most of the unit test in a reliable, synchronous way. It's way faster now, and it won't show any intermittent failure.
Testing the CSS needs integration tests.
Waiting a Travis run to request review.
Attachment #8343515 -
Attachment is obsolete: true
Assignee | ||
Comment 12•11 years ago
|
||
Comment on attachment 8348711 [details] [review]
Github pull request
Travis has a green test-agent job!
Attachment #8348711 -
Flags: review?(janjongboom)
Comment 13•11 years ago
|
||
Ok, that's a big patch. :p
Assignee | ||
Comment 14•11 years ago
|
||
Rebased on latest master, resolved conflicts, and added comments.
CAN I HAZ REVIEW PLIZ????
Comment 15•11 years ago
|
||
Comment on attachment 8348711 [details] [review]
Github pull request
I find it hard to be very sure that we still test exactly the same, but it's tests and they're green. Thanks.
Attachment #8348711 -
Flags: review?(janjongboom) → review+
Assignee | ||
Comment 16•11 years ago
|
||
(In reply to Jan Jongboom [:janjongboom] from comment #15)
> Comment on attachment 8348711 [details] [review]
> Github pull request
>
> I find it hard to be very sure that we still test exactly the same, but it's
> tests and they're green. Thanks.
To reassure you, I rewrote each test one at a time. I only merged 2 of them when it made sense (like doing the same action and then testing something different).
Assignee | ||
Comment 17•11 years ago
|
||
master: ecf64f1c4bbbe48b0570fabee708d514872cb50b
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 18•11 years ago
|
||
a=tests
v1.3: 73942ce4885fc8274654f832466002476a8aaf41
status-b2g-v1.3:
--- → fixed
Comment 19•11 years ago
|
||
Thanks Julien!
Green travis ftw
You need to log in
before you can comment on or make changes to this bug.
Description
•