Closed Bug 897078 Opened 9 years ago Closed 8 years ago

[fig] Intermittent testImportFromAndroid | Waiting for search bar - Search bar found

Categories

(Firefox for Android Graveyard :: General, defect)

ARM
Android
defect
Not set
normal

Tracking

(firefox24 unaffected, firefox25 unaffected, firefox26 verified)

VERIFIED FIXED
Firefox 26
Tracking Status
firefox24 --- unaffected
firefox25 --- unaffected
firefox26 --- verified

People

(Reporter: Margaret, Assigned: AdrianT)

References

Details

(Keywords: intermittent-failure)

Attachments

(1 file, 1 obsolete file)

https://tbpl.mozilla.org/php/getParsedLog.php?id=25592657&tree=Fig

0 INFO SimpleTest START
1 INFO TEST-START | testImportFromAndroid
EventExpecter: no longer listening for Gecko:Ready
2 INFO TEST-PASS | testImportFromAndroid | Inserted at:  - content://org.mozilla.fennec_fig.db.browser/bookmarks/9?profile=default
3 INFO TEST-PASS | testImportFromAndroid | Inserted at:  - content://org.mozilla.fennec_fig.db.browser/bookmarks/10?profile=default
4 INFO TEST-PASS | testImportFromAndroid | Inserted at:  - content://org.mozilla.fennec_fig.db.browser/bookmarks/11?profile=default
5 INFO TEST-PASS | testImportFromAndroid | Inserted at:  - content://org.mozilla.fennec_fig.db.browser/bookmarks/12?profile=default
6 INFO TEST-PASS | testImportFromAndroid | Inserted at:  - content://org.mozilla.fennec_fig.db.browser/bookmarks/13?profile=default
7 INFO TEST-PASS | testImportFromAndroid | Inserted at:  - content://org.mozilla.fennec_fig.db.browser/bookmarks/14?profile=default
8 INFO TEST-PASS | testImportFromAndroid | Inserted at:  - content://org.mozilla.fennec_fig.db.browser/bookmarks/15?profile=default
9 INFO TEST-PASS | testImportFromAndroid | Inserted at:  - content://org.mozilla.fennec_fig.db.browser/bookmarks/16?profile=default
10 INFO TEST-PASS | testImportFromAndroid | Inserted at:  - content://org.mozilla.fennec_fig.db.browser/bookmarks/17?profile=default
11 INFO TEST-PASS | testImportFromAndroid | Inserted at:  - content://org.mozilla.fennec_fig.db.browser/bookmarks/18?profile=default
12 INFO TEST-PASS | testImportFromAndroid | Inserted at:  - content://org.mozilla.fennec_fig.db.browser/bookmarks/19?profile=default
13 INFO TEST-PASS | testImportFromAndroid | Inserted at:  - content://org.mozilla.fennec_fig.db.browser/bookmarks/20?profile=default
waitForText timeout on ^Settings$
14 INFO TEST-UNEXPECTED-FAIL | testImportFromAndroid | Waiting for search bar - Search bar found
Exception caught during test!
junit.framework.AssertionFailedError: 14 INFO TEST-UNEXPECTED-FAIL | testImportFromAndroid | Waiting for search bar - Search bar found
	at junit.framework.Assert.fail(Assert.java:47)
	at org.mozilla.fennec_fig.FennecMochitestAssert._logMochitestResult(FennecMochitestAssert.java:107)
	at org.mozilla.fennec_fig.FennecMochitestAssert.ok(FennecMochitestAssert.java:136)
	at org.mozilla.fennec_fig.tests.testImportFromAndroid.importDataFromAndroid(testImportFromAndroid.java:154)
	at org.mozilla.fennec_fig.tests.testImportFromAndroid.testImportFromAndroid(testImportFromAndroid.java:48)
	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_fig.tests.BaseTest.runTest(BaseTest.java:157)
	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)
15 INFO TEST-UNEXPECTED-FAIL | testImportFromAndroid | Exception caught - junit.framework.AssertionFailedError: 14 INFO TEST-UNEXPECTED-FAIL | testImportFromAndroid | Waiting for search bar - Search bar found
16 INFO TEST-END | testImportFromAndroid | finished in 190736ms
17 INFO TEST-START | Shutdown
18 INFO Passed: 12
19 INFO Failed: 2
20 INFO Todo: 0
21 INFO SimpleTest FINISHED
Assignee: nobody → adrian.tamas
Attached patch fix import from android test (obsolete) — Splinter Review
Added a wait for the import from android pop-up to be closed. Sometimes the pop-up takes a few seconds to close since some tegras have a lot of history items on them from past tests ran on the android browser.

Waiting for the tryserver run to confirm fix: https://tbpl.mozilla.org/?tree=Try&rev=37b05a94db7a
Attachment #795461 - Flags: review?(margaret.leibovic)
Comment on attachment 795461 [details] [diff] [review]
fix import from android test

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

Nice.

::: mobile/android/base/tests/testImportFromAndroid.java.in
@@ +142,5 @@
>  
>          // The Import button is the first on Gingerbread and the second in Honeycomb and newer
>          mSolo.clickOnButton("Import");
>  
> +        // Wait until the import pop-up is dismissed. This depending on the numeber of items int he android history can take up to a few seconds

Typo in here.

@@ +157,5 @@
>              // Phones don't have headers like tablets, so we need to pop up one more level.
>              waitForText("Import from Android");
>              mActions.sendSpecialKey(Actions.SpecialKey.BACK);
>          }
> +        waitForText("Privacy");

Why this change?
Attachment #795461 - Flags: review?(margaret.leibovic) → review+
(In reply to :Margaret Leibovic from comment #59)
> Comment on attachment 795461 [details] [diff] [review]
> fix import from android test
> 
> Review of attachment 795461 [details] [diff] [review]: 
> @@ +157,5 @@
> >              // Phones don't have headers like tablets, so we need to pop up one more level.
> >              waitForText("Import from Android");
> >              mActions.sendSpecialKey(Actions.SpecialKey.BACK);
> >          }
> > +        waitForText("Privacy");
> 
> Why this change?

I changed the string here because "Settings" is the header of the Settings menu and the waitForText would never wait here since that is always visible. Waiting for an item from the top Settings menu view ensures we are there on phones.

Corrected the typo you pointed out plus 1 more I found and also removed a comment that is pointless now and remained there since the button click was done using indexes and was done with a check for os type.
Attachment #795461 - Attachment is obsolete: true
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/5cf31589b508
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → Firefox 26
Since there are no more fails, I’m setting this as verified.
Status: RESOLVED → VERIFIED
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.