Closed Bug 758792 Opened 9 years ago Closed 9 years ago

Robocop: getActivityFromClick can hang on waitForIdleSync

Categories

(Testing :: General, defect)

x86
Android
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
mozilla16

People

(Reporter: gbrown, Assigned: gbrown)

References

Details

Attachments

(1 file, 1 obsolete file)

Intense testing (repeated testCheck/2/3) and logging shows that BaseTest.getActivityFromClick sometimes hangs during one or the other call to waitForIdleSync. Removing either call causes other problems, but replacing each with a sleep() call improves reliability considerably.
Blocks: 756817
Simple change: replace 2 waitForIdleSync calls in getActivityFromClick with sleep calls that wait for about the maximum observed wait time spent in waitForIdleSync.

Of course I am uncomfortable introducing additional sleep calls with little justification. However the observed benefit is undeniable, and the waitForIdleSync calls were already a hack, IMO, in that we don't really understand what waitForIdleSync does.

We call waitForIdleSync in a couple of other places, but I have not observed any problems related to those calls, so have not changed those.
Attachment #627829 - Flags: review?(jmaher)
Comment on attachment 627829 [details] [diff] [review]
remove waitForIdleSync calls in getActivityFromClick

Review of attachment 627829 [details] [diff] [review]:
-----------------------------------------------------------------

can we put some comments in describing that waitForIdleSync was not working as expected and this seems to be the most effective way to get the tests to run and pass?  I would like to put a followup bug in to address the sleep stuff in general.
Attachment #627829 - Flags: review?(jmaher) → review+
Updated comments. r=jmaher carried.
Attachment #627829 - Attachment is obsolete: true
Attachment #628164 - Flags: review+
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/c3b1df7ffdab
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.