Closed Bug 886299 Opened 12 years ago Closed 12 years ago

Intermittent testShareLink | Exception caught - junit.framework.AssertionFailedError: The text: Share is not found!

Categories

(Firefox for Android Graveyard :: General, defect)

ARM
Android
defect
Not set
normal

Tracking

(firefox24 fixed, firefox25 fixed)

RESOLVED FIXED
Firefox 25
Tracking Status
firefox24 --- fixed
firefox25 --- fixed

People

(Reporter: emorley, Assigned: AdrianT)

Details

(Keywords: intermittent-failure)

Attachments

(2 files, 1 obsolete file)

Android Armv6 Tegra 250 mozilla-inbound opt test robocop-2 on 2013-06-24 02:32:03 PDT for push 6c3acc2030b0 slave: tegra-095 https://tbpl.mozilla.org/php/getParsedLog.php?id=24510042&tree=Mozilla-Inbound { 15 INFO TEST-PASS | testShareLink | Got the displayed share options? - Got the share options list 16 INFO TEST-PASS | testShareLink | Share option for Top Sites item found - Bluetooth 17 INFO TEST-PASS | testShareLink | Share option for Top Sites item found - Messaging 18 INFO TEST-PASS | testShareLink | Share option for Top Sites item found - Firefox Sync waitForText timeout on Share Exception caught during test! junit.framework.AssertionFailedError: The text: Share is not found! at junit.framework.Assert.fail(Assert.java:47) at junit.framework.Assert.assertTrue(Assert.java:20) at com.jayway.android.robotium.solo.Clicker.clickOnText(Clicker.java:330) at com.jayway.android.robotium.solo.Solo.clickOnText(Solo.java:839) at org.mozilla.fennec.tests.testShareLink.verifySharePopup(testShareLink.java:101) at org.mozilla.fennec.tests.testShareLink.testShareLink(testShareLink.java:90) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:521) at android.test.InstrumentationTestCase.runMethod(InstrumentationTestCase.java:204) at android.test.InstrumentationTestCase.runTest(InstrumentationTestCase.java:194) at android.test.ActivityInstrumentationTestCase2.runTest(ActivityInstrumentationTestCase2.java:186) at org.mozilla.fennec.tests.BaseTest.runTest(BaseTest.java:131) at junit.framework.TestCase.runBare(TestCase.java:127) at junit.framework.TestResult$1.protect(TestResult.java:106) at junit.framework.TestResult.runProtected(TestResult.java:124) at junit.framework.TestResult.run(TestResult.java:109) at junit.framework.TestCase.run(TestCase.java:118) at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:169) at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:154) at android.test.InstrumentationTestRunner.onStart(InstrumentationTestRunner.java:520) at android.app.Instrumentation$InstrumentationThread.run(Instrumentation.java:1447) 19 INFO TEST-UNEXPECTED-FAIL | testShareLink | Exception caught - junit.framework.AssertionFailedError: The text: Share is not found! 20 INFO TEST-END | testShareLink | finished in 126586ms }
Sriram, looks like you're the last person to touch this. It's a top-10 orange bug at this point. Can you please take a look?
Flags: needinfo?(sriram)
I dont understand why this would fail for Bookmarks tab at times. I haven't worked on robocop much.
Flags: needinfo?(sriram)
Adrian -- can you investigate?
Flags: needinfo?(adrian.tamas)
From what I see, the list that will be returned for Top Sites and Bookmarks are the same. Also that it goes through same routines. Somehow the bookmarks aren't showing up, or the long press is not on a view.
Taken collectively, the "Share not found. Have found: ..." messages seem like good evidence that we successfully navigated to the Bookmarks, and the bookmarks are displayed. I see "Gecko event sync taking too long" in these logs...maybe related? 07-09 09:12:50.234 D/GeckoHealthRec( 5466): Recording session end: P 07-09 09:12:50.244 D/GeckoAwesomeBar( 5466): creating awesomebar 07-09 09:12:50.254 D/GeckoAwesomeBarTabs( 5466): Creating AwesomeBarTabs 07-09 09:12:50.474 I/ActivityManager( 1019): Displayed activity org.mozilla.fennec/org.mozilla.gecko.AwesomeBar: 282 ms (total 282 ms) 07-09 09:12:51.404 D/GeckoAppShell( 5466): Gecko event sync taking too long: 1000ms 07-09 09:12:52.404 D/GeckoAppShell( 5466): Gecko event sync taking too long: 2000ms 07-09 09:12:53.044 D/GeckoSessInfo( 5466): Recording session done: 1373361170172 07-09 09:12:53.404 D/GeckoAppShell( 5466): Gecko event sync taking too long: 3001ms 07-09 09:13:18.424 I/Robocop ( 5466): waitForText timeout on Share
Tryserver run: https://tbpl.mozilla.org/?tree=Try&rev=ec0582f05e64 At this time the tryserver run was just started but will continue to re-trigger the runs to check that this fixes the issues. I managed to reproduce the issue on every run on a HTC Desire (Android 2.2). For some reason the test would not actually be in the Bookmarks tab when trying to open the context menu and it would search for 'Share" in Top Sites. After fixing the Bookmarks tab the same was happening on the History tab but here I had to renter the awesomescreen before changing the focus to the history tab.
Attachment #773254 - Flags: review?(gbrown)
Flags: needinfo?(adrian.tamas)
Comment on attachment 773254 [details] [diff] [review] testShareLink fix Review of attachment 773254 [details] [diff] [review]: ----------------------------------------------------------------- I would prefer to see a fix that addresses the root cause of the failure, but the try run is good and these changes look "safe". ::: mobile/android/base/tests/testShareLink.java.in @@ +84,5 @@ > } > > // Test the share popup in the Bookmarks tab > ListView blist = getBookmarksList("about:firefox"); > + mSolo.clickOnText("Bookmarks"); // Make sure we are in the Bookmarks tab Add an additional comment: "TODO: understand why this is sometimes necessary"
Attachment #773254 - Flags: review?(gbrown) → review+
Landed with nit address, so we can reduce the number of these failures asap: https://hg.mozilla.org/integration/mozilla-inbound/rev/f7f197059551
Assignee: nobody → adrian.tamas
Status: NEW → ASSIGNED
addressed even
Attached patch testShareLink fix v2 (obsolete) — Splinter Review
I investigated the issue further and found a much simpler and cleaner fix. It seems that there is a small regression in the time needed to exit the awesomescreen and a wait for the page title to be displayed does the trick here. This passes for me locally now every time on the HTC Desire where without the patch the test would fail every time. I was waiting for the tryserver results but since the old version was integrated I'm adding the new patch now. Tryserver run: https://tbpl.mozilla.org/?tree=Try&rev=31d073262e9b
Attachment #773891 - Flags: review?(gbrown)
Attachment #773891 - Flags: review?(gbrown) → review+
Removing the old version of the fix and adding the new more simple and accurate fix for the test.
Attachment #773891 - Attachment is obsolete: true
Keywords: checkin-needed
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 25
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Notice that comments 104-109 are all on mozilla-aurora -- expected since the fix was not uplifted to aurora at that time. Comments 110 and 111 are for the same log/failure. So there is only 1 unexpected failure (still 1 too many!).
I'm going to call this fixed, actually. All the occurrences are on Fx24 at this point. I'll uplift the fix soon.
Status: REOPENED → RESOLVED
Closed: 12 years ago12 years ago
Resolution: --- → FIXED
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: