Skip to content
This repository has been archived by the owner on Feb 20, 2023. It is now read-only.

Fixes #11642 - Re-enable disabled UI-tests #12142

Merged
merged 1 commit into from
Jul 1, 2020
Merged

Fixes #11642 - Re-enable disabled UI-tests #12142

merged 1 commit into from
Jul 1, 2020

Conversation

rpappalax
Copy link
Contributor

@rpappalax rpappalax commented Jun 30, 2020

Fixes #11642

Pull Request checklist

  • Tests: This PR includes thorough tests or an explanation of why it does not
  • Screenshots: This PR includes screenshots or GIFs of the changes made or an explanation of why it does not
  • Accessibility: The code in this PR follows accessibility best practices or does not include any user facing features. In addition, it includes a screenshot of a successful accessibility scan to ensure no new defects are added to the product.

After merge

  • Milestone: Make sure issues finished by this pull request are added to the milestone of the version currently in development.

To download an APK when reviewing a PR:

  1. click on Show All Checks,
  2. click Details next to "Taskcluster (pull_request)" after it appears and then finishes with a green checkmark,
  3. click on the "Fenix - assemble" task, then click "Run Artifacts".
  4. the APK links should be on the left side of the screen, named for each CPU architecture

@kbrosnan
Copy link
Contributor

Nits: for fixing the ktlint otherwise this looks good

[task 2020-06-30T21:31:35.839Z] > Task :ktlint
[task 2020-06-30T21:31:35.839Z] /builds/worker/checkouts/src/app/src/androidTest/java/org/mozilla/fenix/ui/SettingsAboutTest.kt:13:1: Unused import
[task 2020-06-30T21:31:35.839Z] /builds/worker/checkouts/src/app/src/androidTest/java/org/mozilla/fenix/ui/SettingsAboutTest.kt:73:5: Missing space after //
[task 2020-06-30T21:31:35.839Z] /builds/worker/checkouts/src/app/src/androidTest/java/org/mozilla/fenix/ui/SmokeTest.kt:12:1: Unused import
[task 2020-06-30T21:31:35.840Z] /builds/worker/checkouts/src/app/src/androidTest/java/org/mozilla/fenix/ui/SmokeTest.kt:26:1: Missing space after //
[task 2020-06-30T21:31:35.840Z] /builds/worker/checkouts/src/app/src/androidTest/java/org/mozilla/fenix/ui/StrictEnhancedTrackingProtectionTest.kt:11:1: Unused import
[task 2020-06-30T21:31:35.840Z] /builds/worker/checkouts/src/app/src/androidTest/java/org/mozilla/fenix/ui/StrictEnhancedTrackingProtectionTest.kt:160:5: Missing space after //
[task 2020-06-30T21:31:35.939Z] /builds/worker/checkouts/src/app/src/androidTest/java/org/mozilla/fenix/ui/ThreeDotMenuMainTest.kt:13:1: Unused import
[task 2020-06-30T21:31:35.939Z] /builds/worker/checkouts/src/app/src/androidTest/java/org/mozilla/fenix/ui/ThreeDotMenuMainTest.kt:56:5: Missing space after //

@rpappalax rpappalax added eng:ui-test UI Tests eng:automation Build automation, Continuous integration, .. labels Jun 30, 2020
@rpappalax rpappalax changed the title (WIP) Fixes #11642 - Re-enable disabled UI-tests - DO NOT LAND Fixes #11642 - Re-enable disabled UI-tests Jun 30, 2020
@rpappalax rpappalax added pr:needs-landing PRs that are ready to land [Will be merged by Mergify] and removed pr:do-not-land labels Jul 1, 2020
@rpappalax rpappalax requested a review from kbrosnan July 1, 2020 02:41
@rpappalax
Copy link
Contributor Author

These were run 50 times without incident

@kbrosnan
Copy link
Contributor

kbrosnan commented Jul 1, 2020

There was one failure for testStrictVisitContentShield https://console.firebase.google.com/project/moz-fenix/testlab/histories/bh.66b7091e15d53d45/matrices/5775755259756697270/executions/bs.3a35aa14d22c065c/test-cases

 java.lang.RuntimeException: Could not launch intent Intent { act=android.intent.action.MAIN flg=0x14000000 cmp=org.mozilla.fenix.debug/org.mozilla.fenix.HomeActivity } 
within 45000 milliseconds. Perhaps the main thread has not gone idle within a reasonable amount of time? 
There could be an animation or something constantly repainting the screen. 
Or the activity is doing network calls on creation? See the threaddump logs. 
For your reference the last time the event queue was idle before your activity launch request was 1593564970581 
and now the last time the queue went idle was: 1593564970606. If these numbers are the same your activity might be hogging the event queue. 

Looks like some sort of strict mode violation from the video.

06-30 17:56:11.456: W/BroadcastQueue(2074): Background execution not allowed: receiving Intent { act=android.intent.action.DROPBOX_ENTRY_ADDED flg=0x10 (has extras) } to com.google.android.gms/.stats.service.DropBoxEntryAddedReceiver
06-30 17:56:11.456: W/BroadcastQueue(2074): Background execution not allowed: receiving Intent { act=android.intent.action.DROPBOX_ENTRY_ADDED flg=0x10 (has extras) } to com.google.android.gms/.chimera.GmsIntentOperationService$PersistentTrustedReceiver
06-30 17:56:11.466: I/FirefoxAccountStateMachine(9520): Ran 'Init' side-effects for state Start, got successive event AccountNotFound
06-30 17:56:11.467: I/FirefoxAccountStateMachine(9520): Processing event AccountNotFound for state Start. Next state is NotAuthenticated
06-30 17:56:11.482: D/StrictMode(9520): StrictMode policy violation; ~duration=371 ms: android.os.strictmode.DiskReadViolation
06-30 17:56:11.482: D/StrictMode(9520): 	at android.os.StrictMode$AndroidBlockGuardPolicy.onReadFromDisk(StrictMode.java:1504)
06-30 17:56:11.482: D/StrictMode(9520): 	at android.app.SharedPreferencesImpl.awaitLoadedLocked(SharedPreferencesImpl.java:256)
06-30 17:56:11.482: D/StrictMode(9520): 	at android.app.SharedPreferencesImpl.getInt(SharedPreferencesImpl.java:301)
06-30 17:56:11.482: D/StrictMode(9520): 	at mozilla.components.support.ktx.android.content.IntPreference.getValue(SharedPreferences.kt:50)
06-30 17:56:11.482: D/StrictMode(9520): 	at mozilla.components.support.ktx.android.content.IntPreference.getValue(SharedPreferences.kt:44)
06-30 17:56:11.482: D/StrictMode(9520): 	at org.mozilla.fenix.onboarding.FenixOnboarding.getOnboardedVersion(Unknown Source:7)
06-30 17:56:11.482: D/StrictMode(9520): 	at org.mozilla.fenix.onboarding.FenixOnboarding.userHasBeenOnboarded(FenixOnboarding.kt:30)
06-30 17:56:11.482: D/StrictMode(9520): 	at org.mozilla.fenix.home.CurrentMode.getCurrentMode(Mode.kt:55)
06-30 17:56:11.482: D/StrictMode(9520): 	at org.mozilla.fenix.home.HomeFragment$onCreateView$2.invoke(HomeFragment.kt:191)
06-30 17:56:11.482: D/StrictMode(9520): 	at org.mozilla.fenix.home.HomeFragment$onCreateView$2.invoke(HomeFragment.kt:115)
06-30 17:56:11.482: D/StrictMode(9520): 	at org.mozilla.fenix.components.StoreProviderFactory.create(StoreProvider.kt:42)
06-30 17:56:11.482: D/StrictMode(9520): 	at androidx.lifecycle.ViewModelProvider.get(ViewModelProvider.java:187)
06-30 17:56:11.482: D/StrictMode(9520): 	at androidx.lifecycle.ViewModelProvider.get(ViewModelProvider.java:150)
06-30 17:56:11.482: D/StrictMode(9520): 	at org.mozilla.fenix.components.StoreProvider$Companion.get(StoreProvider.kt:46)
06-30 17:56:11.482: D/StrictMode(9520): 	at org.mozilla.fenix.home.HomeFragment.onCreateView(HomeFragment.kt:186)
06-30 17:56:11.482: D/StrictMode(9520): 	at androidx.fragment.app.Fragment.performCreateView(Fragment.java:2699)
06-30 17:56:11.482: D/StrictMode(9520): 	at androidx.fragment.app.FragmentStateManager.createView(FragmentStateManager.java:320)
06-30 17:56:11.482: D/StrictMode(9520): 	at androidx.fragment.app.FragmentManager.moveToState(FragmentManager.java:1199)
06-30 17:56:11.482: D/StrictMode(9520): 	at androidx.fragment.app.FragmentManager.addAddedFragments(FragmentManager.java:2236)
06-30 17:56:11.482: D/StrictMode(9520): 	at androidx.fragment.app.FragmentManager.executeOpsTogether(FragmentManager.java:2009)
06-30 17:56:11.482: D/StrictMode(9520): 	at androidx.fragment.app.FragmentManager.removeRedundantOperationsAndExecute(FragmentManager.java:1965)
06-30 17:56:11.482: D/StrictMode(9520): 	at androidx.fragment.app.FragmentManager.execPendingActions(FragmentManager.java:1861)
06-30 17:56:11.482: D/StrictMode(9520): 	at androidx.fragment.app.FragmentManager.dispatchStateChange(FragmentManager.java:2641)
06-30 17:56:11.482: D/StrictMode(9520): 	at androidx.fragment.app.FragmentManager.dispatchActivityCreated(FragmentManager.java:2589)
06-30 17:56:11.482: D/StrictMode(9520): 	at androidx.fragment.app.Fragment.performActivityCreated(Fragment.java:2723)
06-30 17:56:11.482: D/StrictMode(9520): 	at androidx.fragment.app.FragmentStateManager.activityCreated(FragmentStateManager.java:346)
06-30 17:56:11.482: D/StrictMode(9520): 	at androidx.fragment.app.FragmentManager.moveToState(FragmentManager.java:1200)
06-30 17:56:11.482: D/StrictMode(9520): 	at androidx.fragment.app.FragmentManager.moveToState(FragmentManager.java:1368)
06-30 17:56:11.482: D/StrictMode(9520): 	at androidx.fragment.app.FragmentManager.moveFragmentToExpectedState(FragmentManager.java:1446)
06-30 17:56:11.482: D/StrictMode(9520): 	at androidx.fragment.app.FragmentManager.moveToState(FragmentManager.java:1509)
06-30 17:56:11.482: D/StrictMode(9520): 	at androidx.fragment.app.FragmentManager.dispatchStateChange(FragmentManager.java:2637)
06-30 17:56:11.482: D/StrictMode(9520): 	at androidx.fragment.app.FragmentManager.dispatchActivityCreated(FragmentManager.java:2589)
06-30 17:56:11.482: D/StrictMode(9520): 	at androidx.fragment.app.FragmentController.dispatchActivityCreated(FragmentController.java:247)
06-30 17:56:11.482: D/StrictMode(9520): 	at androidx.fragment.app.FragmentActivity.onStart(FragmentActivity.java:541)
06-30 17:56:11.482: D/StrictMode(9520): 	at androidx.appcompat.app.AppCompatActivity.onStart(AppCompatActivity.java:210)
06-30 17:56:11.482: D/StrictMode(9520): 	at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1391)
06-30 17:56:11.482: D/StrictMode(9520): 	at androidx.test.runner.MonitoringInstrumentation.callActivityOnStart(MonitoringInstrumentation.java:723)
06-30 17:56:11.482: D/StrictMode(9520): 	at android.app.Activity.performStart(Activity.java:7157)
06-30 17:56:11.482: D/StrictMode(9520): 	at android.app.ActivityThread.handleStartActivity(ActivityThread.java:2937)
06-30 17:56:11.482: D/StrictMode(9520): 	at android.app.servertransaction.TransactionExecutor.performLifecycleSequence(TransactionExecutor.java:180)
06-30 17:56:11.482: D/StrictMode(9520): 	at android.app.servertransaction.TransactionExecutor.cycleToPath(TransactionExecutor.java:165)
06-30 17:56:11.482: D/StrictMode(9520): 	at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:142)
06-30 17:56:11.482: D/StrictMode(9520): 	at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:70)
06-30 17:56:11.482: D/StrictMode(9520): 	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1808)
06-30 17:56:11.482: D/StrictMode(9520): 	at android.os.Handler.dispatchMessage(Handler.java:106)
06-30 17:56:11.482: D/StrictMode(9520): 	at android.os.Looper.loop(Looper.java:193)
06-30 17:56:11.482: D/StrictMode(9520): 	at android.app.ActivityThread.main(ActivityThread.java:6669)

@rpappalax
Copy link
Contributor Author

There was one failure for testStrictVisitContentShield https://console.firebase.google.com/project/moz-fenix/testlab/histories/bh.66b7091e15d53d45/matrices/5775755259756697270/executions/bs.3a35aa14d22c065c/test-cases

Oh, good to know. This isn't one of the test we're re-enabling, so creating new issue: #12161

@rpappalax rpappalax merged commit 11aea32 into mozilla-mobile:master Jul 1, 2020
@rpappalax rpappalax deleted the re-enable-tests branch July 1, 2020 16:16
@liuche liuche mentioned this pull request Jul 20, 2020
9 tasks
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
eng:automation Build automation, Continuous integration, .. eng:ui-test UI Tests pr:needs-landing PRs that are ready to land [Will be merged by Mergify]
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Instrumentation Runner crashing in x86 UI tests: JNI error crash in GeckoView
2 participants