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)

x86_64
Linux
defect
Not set
normal

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)
ping Jan and Gary. Could one of you help look into this? Thanks.
Flags: needinfo?(janjongboom)
Flags: needinfo?(gchen)
Assignee: nobody → gchen
Flags: needinfo?(gchen)
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)
Flags: needinfo?(janjongboom)
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)
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.
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.
I'm doing it right now, you'll take it or not ;)
Assignee: gchen → felash
It's fine, Sorry, I am busy on fugu issue.
Flags: needinfo?(gchen)
Attached file Github pull request
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
Comment on attachment 8348711 [details] [review] Github pull request Travis has a green test-agent job!
Attachment #8348711 - Flags: review?(janjongboom)
Ok, that's a big patch. :p
Rebased on latest master, resolved conflicts, and added comments. CAN I HAZ REVIEW PLIZ????
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+
(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).
master: ecf64f1c4bbbe48b0570fabee708d514872cb50b
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
a=tests v1.3: 73942ce4885fc8274654f832466002476a8aaf41
Thanks Julien! Green travis ftw
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: