Closed
Bug 946728
Opened 12 years ago
Closed 11 years ago
DragDrop unit tests fail
Categories
(Firefox OS Graveyard :: Gaia::Homescreen, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
1.4 S3 (14mar)
People
(Reporter: crdlc, Assigned: crdlc)
References
Details
(Whiteboard: [systemsfe])
Attachments
(1 file, 2 obsolete files)
No description provided.
Assignee | ||
Updated•12 years ago
|
Assignee: nobody → crdlc
Status: NEW → ASSIGNED
Assignee | ||
Comment 1•12 years ago
|
||
Attachment #8343077 -
Flags: review?(francisco.jordano)
Updated•12 years ago
|
Attachment #8343077 -
Flags: review?(francisco.jordano) → review+
Assignee | ||
Comment 2•12 years ago
|
||
I am going to disable all dragdrop tests because they are failing and I don't know why it is happening. We have to investigate the root case.
Assignee | ||
Comment 3•12 years ago
|
||
Assignee | ||
Updated•12 years ago
|
Summary: DragDrop unit tests are very slow and sometimes fires timeouts → DragDrop unit tests fail
Assignee | ||
Comment 4•12 years ago
|
||
Hi guys, any suggestion why it could be happening? I haven't touched that code some months ago
Comment 5•12 years ago
|
||
ENSURE_DRAG_END_DELAY is 1sec, it's what causes the delay in the "end(" part of the test.
One simple change could be to use sinon's fake timers (`this.sinon.useFakeTimers()` in setup) and use `this.sinon.clock.tick(1000)` at the end of the "end" function.
The "move(" call takes 400ms and the reason is probably the same, although I don't find where it is (the onpageready event is more difficult to track ;) ). You could try to add `this.sinon.clock.tick(400)` at the end of the "move" function and see how this works ;)
You might need other calls to "this.sinon.clock.tick()" (without a value) because we have a lot of setTimeout without values, but maybe the other calls would make this work without this.
Comment 6•12 years ago
|
||
> Hi guys, any suggestion why it could be happening? I haven't touched that code some months ago
It's like this since months :p
Assignee | ||
Comment 7•12 years ago
|
||
but today every time jijij
Comment 8•12 years ago
|
||
note: I don't know why they fail (they don't here), but my comment 5 explains why they're slow. But this could be the cause (Travis does not like setTimeouts)
Comment 9•12 years ago
|
||
I tried to do my comment 5 but it doesn't work right now.
I'd like to try to redo the tests without loading page.js, it should be easier to debug... But is is a big work :(
Assignee | ||
Comment 10•12 years ago
|
||
Well, I've implemented it [1] and each test runs in 50-80ms in my pc. We will see what happens in Travis
[1] https://github.com/crdlc/gaia/commit/3d0dd7e8ac839b0fb2871e5a7b53dfb7769b26c6
Comment 11•12 years ago
|
||
Does not work at all yet, but this is for reference.
Comment 12•12 years ago
|
||
(In reply to Cristian Rodriguez (:crdlc) (OFF 12/06 -- 12/10) from comment #10)
> Well, I've implemented it [1] and each test runs in 50-80ms in my pc. We
> will see what happens in Travis
>
> [1]
> https://github.com/crdlc/gaia/commit/3d0dd7e8ac839b0fb2871e5a7b53dfb7769b26c6
It's still using timeouts, so based on past experience this will trigger intermittents for sure.
Assignee | ||
Comment 13•12 years ago
|
||
for sure, it was just a test. In my pc is 50ms instead of 1400ms. You can follow working on your patch and when I will come back I can be your reviewer ;)
Assignee | ||
Comment 14•12 years ago
|
||
Julien, please, feel free to take this bug because you created a patch to fix this. I prefer to focus on download manager bugs right now
Assignee: crdlc → nobody
Status: ASSIGNED → NEW
Comment 15•12 years ago
|
||
Taking it, not sure if I'll have the time to work on this but we'll see.
Don't hesitate to steal if you want to work on this.
Assignee: nobody → felash
Assignee | ||
Comment 17•11 years ago
|
||
I've killed the asynchrony :)
Before 11.05s -> After 0.82s
Attachment #8343077 -
Attachment is obsolete: true
Attachment #8343182 -
Attachment is obsolete: true
Attachment #8386710 -
Flags: review?(felash)
Comment 18•11 years ago
|
||
Comment on attachment 8386710 [details]
16948.html
r=me
thanks a lot, this was today's good surprise :)
Attachment #8386710 -
Flags: review?(felash) → review+
Assignee | ||
Comment 19•11 years ago
|
||
:), ok going to github, thx
Comment 20•11 years ago
|
||
Will probably fix bug 938651 too
Assignee | ||
Comment 21•11 years ago
|
||
Merged in master:
https://github.com/mozilla-b2g/gaia/commit/f73cf17b9ad945084fdf852244fe332f261cc540
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Updated•11 years ago
|
Whiteboard: [systemsfe]
Target Milestone: --- → 2.0 S2 (23may)
Updated•11 years ago
|
Target Milestone: 2.0 S2 (23may) → 1.4 S3 (14mar)
You need to log in
before you can comment on or make changes to this bug.
Description
•