Closed Bug 1113751 Opened 10 years ago Closed 10 years ago

testBackButtonInEditMode sometimes crashes on shutdown

Categories

(Firefox for Android Graveyard :: Testing, defect)

x86_64
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Firefox 37

People

(Reporter: gbrown, Assigned: gbrown)

References

Details

Attachments

(1 file)

testBackButtonInEditMode does not usually run the testBackPressInEditMode or testExitUsingBackButton tests, and sometimes crashes after running the tests that it does run.

http://ftp.mozilla.org/pub/mozilla.org/mobile/tinderbox-builds/mozilla-inbound-android-api-9/1419006464/mozilla-inbound_ubuntu64_vm_mobile_test-robocop-4-bm117-tests1-linux64-build520.txt.gz
I think the issue is that robocop starts shutting down the browser after the first test, then junit finds and starts the next one.

09:54:47     INFO -  12-19 09:31:01.413 I/Robocop ( 1680): {"message":"finished in 100934ms","time":1419010261389,"source":"robocop","status":"OK","test":"testBackButtonInEditMode","thread":null,"action":"test_end","pid":null}
09:54:47     INFO -  12-19 09:31:01.443 I/Robocop ( 1680): {"action":"log","message":"TEST-START | Shutdown","time":1419010261417,"pid":null,"level":"info","source":"robocop","thread":null}
09:54:47     INFO -  12-19 09:31:01.485 I/Robocop ( 1680): {"action":"log","message":"Passed: 29","time":1419010261456,"pid":null,"level":"info","source":"robocop","thread":null}
09:54:47     INFO -  12-19 09:31:01.522 I/Robocop ( 1680): {"action":"log","message":"Failed: 0","time":1419010261512,"pid":null,"level":"info","source":"robocop","thread":null}
09:54:47     INFO -  12-19 09:31:01.522 I/Robocop ( 1680): {"action":"log","message":"Todo: 0","time":1419010261525,"pid":null,"level":"info","source":"robocop","thread":null}
09:54:47     INFO -  12-19 09:31:01.533 I/Robocop ( 1680): {"action":"log","message":"SimpleTest FINISHED","time":1419010261534,"pid":null,"level":"info","source":"robocop","thread":null}
09:54:47     INFO -  12-19 09:31:02.434 I/GeckoDump( 1680): Robocop:Quit received -- requesting quit
09:54:47     INFO -  12-19 09:31:03.022 I/GeckoConsole( 1680): 1419010263023	addons.update-checker	WARN	Request failed: http://10.0.2.2:8854/extensions-dummy/updateBackgroundURL - 404: Not Found
09:54:47     INFO -  12-19 09:31:03.022 I/Gecko   ( 1680): 1419010263023	addons.update-checker	WARN	Request failed: http://10.0.2.2:8854/extensions-dummy/updateBackgroundURL - 404: Not Found
09:54:47     INFO -  12-19 09:31:03.132 I/GeckoConsole( 1680): 1419010263134	addons.update-checker	WARN	Request failed: http://10.0.2.2:8854/extensions-dummy/updateBackgroundURL - 404: Not Found
09:54:47     INFO -  12-19 09:31:03.132 I/Gecko   ( 1680): 1419010263134	addons.update-checker	WARN	Request failed: http://10.0.2.2:8854/extensions-dummy/updateBackgroundURL - 404: Not Found
09:54:47     INFO -  12-19 09:31:03.172 I/GeckoConsole( 1680): 1419010263179	addons.update-checker	WARN	Request failed: http://10.0.2.2:8854/extensions-dummy/updateBackgroundURL - 404: Not Found
09:54:47     INFO -  12-19 09:31:03.183 I/Gecko   ( 1680): 1419010263179	addons.update-checker	WARN	Request failed: http://10.0.2.2:8854/extensions-dummy/updateBackgroundURL - 404: Not Found
09:54:47     INFO -  12-19 09:31:05.142 D/        ( 1680): HostConnection::get() New Host Connection established 0x2a6390, tid 1691
09:54:47     INFO -  12-19 09:31:08.673 D/GeckoHealthRec( 1680): Recording session end: P
09:54:47     INFO -  12-19 09:31:09.067 V/GeckoHealthRec( 1680): Recorded session entry for env 1, current is 1
09:54:47     INFO -  12-19 09:31:09.067 D/GeckoSessInfo( 1680): Recording session done: 1419010163920
09:54:47     INFO -  12-19 09:31:09.723 W/ActivityManager(   64): Duplicate finish request for HistoryRecord{4073b320 org.mozilla.fennec/org.mozilla.gecko.BrowserApp}
09:54:47     INFO -  12-19 09:31:09.723 I/GeckoHealth( 1680): fennec :: HealthReportBroadcastService :: Registering HealthReportPruneService.
09:54:47     INFO -  12-19 09:31:09.723 I/GeckoHealth( 1680): fennec :: BackgroundService :: Setting inexact repeating alarm for interval 86400000
09:54:47     INFO -  12-19 09:31:10.033 W/InputDispatcher(   64): Permission denied: injecting event from pid 1680 uid 10017 to window with input channel 40748bc8 com.mozilla.SUTAgentAndroid/com.mozilla.SUTAgentAndroid.SUTAgentAndroid (server) owned by uid 10032
09:54:47     INFO -  12-19 09:31:10.062 W/WindowManager(   64): Input event injection permission denied.
09:54:47     INFO -  12-19 09:31:10.062 W/ActivityManager(   64): Duplicate finish request for HistoryRecord{4073b320 org.mozilla.fennec/org.mozilla.gecko.BrowserApp}
09:54:47     INFO -  12-19 09:31:10.723 I/TestRunner( 1680): finished: testBackButtonInEditMode(org.mozilla.gecko.tests.testBackButtonInEditMode)
09:54:47     INFO -  12-19 09:31:10.723 I/TestRunner( 1680): passed: testBackButtonInEditMode(org.mozilla.gecko.tests.testBackButtonInEditMode)
09:54:47     INFO -  12-19 09:31:10.733 I/TestRunner( 1680): started: testBackPressInEditMode(org.mozilla.gecko.tests.testBackButtonInEditMode)
09:54:47     INFO -  12-19 09:31:10.753 D/GeckoAppShell( 1680): Gecko event sync taking too long: 1001ms
09:54:47     INFO -  12-19 09:31:10.873 I/Robocop ( 1680): {"action":"log","message":"SimpleTest START","time":1419010270876,"pid":null,"level":"info","source":"robocop","thread":null}
09:54:47     INFO -  12-19 09:31:10.882 I/Robocop ( 1680): {"action":"test_start","time":1419010270883,"pid":null,"source":"robocop","test":"testBackButtonInEditMode","thread":null}
09:54:47     INFO -  12-19 09:31:10.902 I/ActivityManager(   64): Starting: Intent { act=android.intent.action.MAIN flg=0x10000000 cmp=org.mozilla.fennec/org.mozilla.gecko.BrowserApp (has extras) } from pid 1680
09:54:47     INFO -  12-19 09:31:10.932 E/ResourceType(   64): Style contains key with bad entry: 0x0101034f
09:54:47     INFO -  12-19 09:31:11.753 D/GeckoAppShell( 1680): Gecko event sync taking too long: 2002ms
09:54:47     INFO -  12-19 09:31:12.162 I/GeckoHealthRec( 1680): Closing Health Report client.
09:54:47     INFO -  12-19 09:31:12.162 D/GeckoFavicons( 1680): Closing Favicons database
09:54:47     INFO -  12-19 09:31:12.654 W/ActivityManager(   64): Duplicate finish request for HistoryRecord{4073b320 org.mozilla.fennec/org.mozilla.gecko.BrowserApp}
09:54:47     INFO -  12-19 09:31:12.686 E/ResourceType( 1680): Style contains key with bad entry: 0x0101034f
09:54:47     INFO -  12-19 09:31:12.692 D/GeckoAppShell( 1680): Killing via System.exit()
Blocks: 898613
Oh, I see now -- testBackPressInEditMode or testExitUsingBackButton are (correctly) called from the main test function. Those functions should be private and/or renamed to something other than testXXX.
Blocks: 1105388
Summary: testBackButtonInEditMode does not run all tests, and sometimes crashes → testBackButtonInEditMode sometimes crashes on shutdown
This renames testBackPressInEditMode() to checkBackPressInEditMode() and testExitUsingBackButton() to checkExitUsingBackButton() (and I made the check functions private, for good measure). That way there is only one public testXXX function for the test framework to attempt to run.

:mcomella -- Is there a wiki or something with robocop best practices listed? I'd like to note something like "write one and only one test function per robocop test".
Attachment #8539500 - Flags: review?(vivekb.balakrishnan)
Attachment #8539500 - Flags: feedback?(michael.l.comella)
(In reply to Geoff Brown [:gbrown] from comment #4)
> :mcomella -- Is there a wiki or something with robocop best practices
> listed? I'd like to note something like "write one and only one test
> function per robocop test".

The closest, at the moment, is probably https://wiki.mozilla.org/Mobile/Fennec/Android/UITest#Writing_UITests (though unfortunately focused on UITest at the moment).
Attachment #8539500 - Flags: feedback?(michael.l.comella) → feedback+
Comment on attachment 8539500 [details] [diff] [review]
rename testXXX helper functions

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

Looks good to me.
Attachment #8539500 - Flags: review?(vivekb.balakrishnan) → review+
https://hg.mozilla.org/mozilla-central/rev/ab11355d5425
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 37
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: